uwp

KeyDown Handling C# / UWP

南楼画角 提交于 2019-12-11 15:29:27
问题 I'm Trying to make app send a pulse to a relay. I got it done with a Button_click, but now I want to do it with any keystroke. What Can I use for this? I read about KeyDown but I don't really know how to integrate it, Any help would be much appreciated. Thank you in advance! Here is how my code looks like: private void Button_Click(object sender, RoutedEventArgs e) { if (relay_state == 0) { relayPin.Write(GpioPinValue.Low); relay_state = 1; } else if (relay_state == 1) { relayPin.Write

Fluent AcrylicBrush does not switch between Light, Dark, theme etc. UWP

喜欢而已 提交于 2019-12-11 15:28:56
问题 Defined Light theme ( <AcrylicBrush TintColor="Red"/> ), Dark, ( <AcrylicBrush TintColor="Orange"/> ) in App.xaml. Per this post, Changing UWP project's Target Version from 1803 to 1809 disables NavigationView's Acrylic texture - why?, I added the following to ShellPage.xaml. The expected behavior when I toggle between Light and Dark theme is that the app NavigationView control will have an AcrylicBrush tint that toggles between Red and Orange. In the definition below, actual behavior is it

UWP: optimize crash report with HockeyApp

假装没事ソ 提交于 2019-12-11 15:22:00
问题 I've developed an UWP app for a client: as we encountered some bugs that I can't reproduce on my device, we've implemented HockeyApp . The client wanted to gain time/money so I only used the basis crash report: HockeyClient.Current.Configure("xxxxxx", new TelemetryConfiguration() { EnableDiagnostics = true }) .SetExceptionDescriptionLoader((Exception ex) => { return "Exception HResult: " + ex.HResult.ToString(); }); But it seems that isn't enough, as the doesn't allow me to fix the latest

How can change font size in UWP TimePikcerFlyout?

谁都会走 提交于 2019-12-11 15:17:07
问题 I want to make the font size of TimePickerFlyout bigger, It's Possible? 回答1: The area that you pointed is LoopingSelector of TimerPicker. And the default font size is 15 in LoopingSelector style like the following. <Style TargetType="LoopingSelector"> <Setter Property="ShouldLoop" Value="True" /> <Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" /> <Setter Property="ItemTemplate"> <Setter.Value> <DataTemplate> <StackPanel VerticalAlignment="Center">

UWP background task location tracking

不问归期 提交于 2019-12-11 15:16:29
问题 I'm trying to develop an UWP app that is able to continually track the user's location in an in-process background task. I've been looking at the Microsoft sample code on GitHub (geolocation / Secenario3_BackgroundTask) but the problem there is that it is based on a TimeTrigger. The shortest interval that TimeTrigger allows is 15 minutes, but I need to get location updates much more frequently. Let's say at least once per minute. Is that possible at all? I've seen that there is a

How to launch javascript universal windows application from another UWP app in windows IoT?

戏子无情 提交于 2019-12-11 15:13:57
问题 My requirement is to launch UWP app from another UWP app.And i made it but its working in windows 10 desktop system not on Windows IoT OS,Kindly help me to fix this. $(document).on('click', '.openTAT', function () { var testAppUri = new Windows.Foundation.Uri("test-app2app:"); var options = new Windows.System.LauncherOptions(); options.TargetApplicationPackageFamilyName = "TATApp_ehke6zp0mbebr"; Windows.System.Launcher.launchUriAsync(testAppUri, options).then( function (success) { if (success

Get Internal Drives Using Windows.Storage Namespace in UWP

和自甴很熟 提交于 2019-12-11 15:08:19
问题 Having spent some time reading up on the Windows.Storage classes and methods, I'm a bit shocked to find that there is no simple way to retrieve a list of the internal drives on a machine using UWP. I've found examples such as this: How to get logical drives names in Windows 10?, but this provides the removable drives only (Flash drives, DVD drive, etc). I know I can allow the user to select a folder and that'll provide me with the handle to the selected drive, but it seems clunky as I want

How can I reconnect to BLE device? - UWP

淺唱寂寞╮ 提交于 2019-12-11 14:58:49
问题 Both the device id and the address are random that I CANNOT re-use them for bleDevice = await BluetoothLEDevice.FromIdAsync or bleDevice = await BluetoothLEDevice.FromBluetoothAddressAsync . I came up with 2 possible solutions: (1)ConnectionStatusChange & (2)Pairing, but both cases I have problems. (1) MAIN QUESTION Before I disconnect, I first save the bleDevice as bleDeviceReconnect . Then I unsubscribe, dispose characteristics & service & bluetooth le device, and set them to null. In the

Windows 10 UWP XAML stowed_exception_802b000a_my_app.dll!windows::ui::xaml::iapplicationstatics__impl::stubclass.loadcomponent

笑着哭i 提交于 2019-12-11 14:47:28
问题 I have a problem with a Windows 10 UWP Store App. In the app are two pages (Page1 and Page2) with similar xaml controls, but one page (Page1) cause a lot of problems while testing the app by microsoft. If they try to start the app the initialization of Page1 throw an exception. When I remove one specific xaml control all is fine, but Page2 contains exactly the same controls and works perfectly. On my local machine I have no exceptions, no warnings, the windows certification kit say the app

Route media audio to speakereven if headset is connect (UWP)

冷暖自知 提交于 2019-12-11 14:46:53
问题 In scenario 2 of this Audio Creation uwp project i noticed it capture audio from microphone and give output to selected output device in real time. So in this scenario i selected speaker as output device and start record so it start capture audio from microphone and give output to speakers even if my earphones is connected. as shown in image it route audio to media instead of headphones so similarly i want to route media, mp3,FM audio to speaker even if headset is connected. 回答1: This is a