windows-10

How to add icons to SecondaryCommands in Command Bar

徘徊边缘 提交于 2019-12-04 21:47:21
I am trying to build a CommandBar that looks like this: Desired CommandBar with SecondaryCommands that have icons But I can't find a way to edit the default style of CommandOverflowPresenter in order to show SecondaryCommands like they are shown in Mail Windows 10 universal app, with icons on the left and text labels on the right. The CommandOverflowPresenter doesn't have a Content property to build a control template around it and bind content elements to AppBarButton Icon and Label properties. I found this article , but it doesn't show the Style for the AppBarButton. There was another

How to get the system accent color for UWP-Apps?

混江龙づ霸主 提交于 2019-12-04 21:36:37
I'm trying to get the Accent Color of a user in a UWP-App for Windows 10. I know how to get it in C#, but I develop my apps in WinJS. So does anyone knows the WinJS equivalent for var color = (Color)Application.Current.Resources["SystemAccentColor"]; ? It would also be nice, if I could Access this Color with CSS. I found some hints, that color: Highlight; would be the solution, but this gives me only a blue and not the Accent Color. Thanks alot. you can use WinRT API to do that : Windows.UI.ViewManagement.UIColorType enumeration provides all accents colors. You can make something like : var

Bluetooth scan C#

此生再无相见时 提交于 2019-12-04 21:28:36
I'm developing a C# WinForms app on Windows 10. I want to perform a Bluetooth environment scan and get devices list all around the PC. I also want the RSSI of each device. I have tried 32feet library but I can't access RSSI. Have you a solution or should I migrate to WPF/UWP? ok, I have found a solution here . You first have to install Windows10 development kit. Then in your project you have to add this library: C:\Program Files (x86)\Windows Kits\10\UnionMetadata\Windows.winmd Or you can install the "UwpDesktop" NuGet Package. This works with Console app, Winforms, WPF and UWP. Here is a

Programatically Pin\UnPin the folder from quick access menu in windows 10

强颜欢笑 提交于 2019-12-04 20:17:30
问题 I have a desktop application written in c#, and this application enables users to create the folder on their machine Hard drive . on windows 7 and 8, The App creates a shortcut for this folder under Favorit menu on the left side of windows Explorer window. In windows 10 there is no Favorite menu, it was replaced by Quick access menu, and if you right click on the folder you can choose to Pin folder for quick access. To do this programmatically from inside c# code, I found a .exe that can

Handling suspend, resume, and activation in windows 10 UWP

Deadly 提交于 2019-12-04 20:08:47
问题 In the windows 8.1 universal apps, the suspend/resume modes were handled using the NavigationHelper.cs ans SuspensionManager.cs classes included in the APP template. These classes doesn't seem to be there in the windows 10 UWP apps. Is there a way by which we can handle the suspend/resume states? 回答1: There's an interesting framework being developed by the community (but mostly I think Jerry Nixon, Andy Wigley etc.) called Template10. Template10 has a Bootstrapper class with OnSuspending and

Windows 10 specific crash on call LeaveCriticalSection

那年仲夏 提交于 2019-12-04 19:10:35
I stucked into a problem with threads syncronization and critical sections on Windows 10. Application will crash in this case: Application has two threads. Thread 1 calls EnterCriticalSection with object m_CS Thread 2 then attempts to enter the same critical section Thread 1 terminates Thread 2 using TerminateThread Thread 1 calls LeaveCriticalSection In previous Windows versions which I was able to test (7, 8, 8.1) this works properly. Thread 2 terminates, and Thread 1 leaves the critical section without exception. On Windows 10, when Thread 1 leaves the critical section, application crashes

Windows 10 IoT Raspberry Pi 2: Autostart published Application

天涯浪子 提交于 2019-12-04 18:52:55
问题 I'm starting making experience with the Raspberry Pi 2 Development with Windows 10 and I was wondering how can I configurate the Raspberry Pi 2 to autostart my own published application, I developed in Visual Studio? And furthermore: How can I set up time & Region on my device? Thank you so much for all helpfull and well meant answers. 回答1: I was looking at how to do this myself this evening. What I found was that you can edit the Pi's startup through Powershell on your PC and tell it what

Not able to connect docker from host when network change Docker for Windows

╄→尐↘猪︶ㄣ 提交于 2019-12-04 18:37:43
I am not able to connect to docker container when there is network/ip change from office to home. But the same works with localhost or 127.0.0.1 I am connecting to VPN to connect to database. root@1c970ed5cd64:/etc# curl http://localhost:8090/admin/health_check/all {“health”:“passed”}root@1c970ed5cd64:/etc# curl http://192.168.0.103:8090/admin/health_check/all curl: (7) Failed to connect to 192.168.0.103 port 8090: Connection refused When i install docker again everything works fine. I have created docker-machine with external virtual switch pointing to wifi and ran the container with the host

WebBrowser control and Windows 10 issue (Navigation canceled)

眉间皱痕 提交于 2019-12-04 18:19:13
I'm trying to run a WebBrowser containing form on a new STA thread. The code runs as expected on Windows 7, but on Windows 10 the navigation cancels automatically. I tried to set each of the zone security settings to minimum from Internet Options but nothing changed. Navigation to the webpage was canceled Zone: My Computer | Protected Mode: Off res://ieframe.dll/navcancl.htm# https://google.com/ This page can’t be displayed Zone: My Computer | Protected Mode: Off res://ieframe.dll/dnserrordiagoff.htm# https://google.com/ Any suggestions? private void button1_Click(object sender, EventArgs e) {

Override theme brush Windows 10 UWP

試著忘記壹切 提交于 2019-12-04 18:06:15
问题 I'm trying to override some style-colors in Windows 10 but I cannot get it to work. My app.xaml looks like this: <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="Resources.xaml"/> </ResourceDictionary.MergedDictionaries> <ResourceDictionary.ThemeDictionaries> <ResourceDictionary x:Key="Default" Source="Theme.xaml"/> </ResourceDictionary.ThemeDictionaries> </ResourceDictionary> </Application.Resources> And my Theme.xaml looks like this