windows-10-universal

Background Task using PushNotificationTrigger()

心不动则不痛 提交于 2020-01-05 08:05:27
问题 For TimerTigger() Background Task is working fine. When I want to debug I can do it from Lifecycle Events. But when I use PushNotificationTrigger() I am not able to debug the background task. I am not getting where I am doing wrong, please help. This is what I get on Lifecycle Events while debugging. This is how I am registering Background task for Raw Notifications, if (!Windows.ApplicationModel.Background.BackgroundTaskRegistration.AllTasks.Any(i => i.Value.Name == "PushBackgroundTask")) {

Display a TextBlock over a MediaElement when in full screen

荒凉一梦 提交于 2020-01-03 05:50:30
问题 I have a MediaElement and a TextBlock next to it. But when I set MediaElement to fullscreen, this TextBlock disappears. Can anyone share a solution? <MediaElement Name="player" Margin="10,5" AreTransportControlsEnabled="True" /> <TextBlock Margin="10"/> 回答1: As I have said in this thread, when we are in the Full Window mode, it will go to the FullWindowMediaRoot layer with the MediaTransportControls. In this way the TextBlock will disapper, because there is no place to show the TextBlock. In

UWP Place TextBlocks on Image

寵の児 提交于 2020-01-02 13:12:30
问题 I'm currently developing universal application that can run on both mobiles and desktops. But I have a little trouble. In my application I have a page to add new credit card to the user profile. So, I set the text on the image using margins, but when my application runs on the device with different resolution, the text will change its position (it's obvious). My question is, how can I do that to let text take its position according to the screen resolution? Here is the correct variant of the

UWP Place TextBlocks on Image

落花浮王杯 提交于 2020-01-02 13:12:22
问题 I'm currently developing universal application that can run on both mobiles and desktops. But I have a little trouble. In my application I have a page to add new credit card to the user profile. So, I set the text on the image using margins, but when my application runs on the device with different resolution, the text will change its position (it's obvious). My question is, how can I do that to let text take its position according to the screen resolution? Here is the correct variant of the

Detect which APIs are present in UWP app

穿精又带淫゛_ 提交于 2020-01-02 09:42:33
问题 Understanding why it's not recommended to detect the device type to perform run-time functionality, best practices dictate detecting which APIs are present instead. This way, users running their tablet in desktop mode, for instance, will not experience undesired behavior. Also, since hardware is so dynamic, checking for user interactions like touch capability is not a good approach either. On our project, we have decided to identify the APIs we'll need for three different screen widths -

Disable certain ListViewItem depending on custom property UWP

笑着哭i 提交于 2020-01-02 07:34:49
问题 I have a ListView that contains several types of custom UserControls . The project requires that some of them must be non-clickable, so I would like to disable them, but JUST THEM . Those items will be enabled/disabled depending on the value of a custom property. I've tried to set the ListViewItem.IsEnabled property to false , but it ain't worked, and the other solutions I've found around make no sense to me... I let a sample of the code: XAML <ListView x:Name="homeLW" Margin="0,5,0,0"

Hololens Apps Will No Longer Build - Cites Metadata file missing and c-Sharp.firstpass not found

故事扮演 提交于 2020-01-02 03:35:08
问题 I have followed the exact steps Microsoft lists under multiple projects within their Microsoft Holographic - Academy tutorials. I completed them all, and all of them worked just fine from creation to export and testing. This is using Unity3D / C# which gets compiled into a Visual Studio Solution (sln) file. After completing those, I went on to build my own app - which built just fine as well. No problem! Now when I try to build - I get a strange error that the c-Sharp.firstpass file (the

UWP Background Task HttpClient fails when device screen is off

十年热恋 提交于 2020-01-01 05:19:05
问题 I'm working on a UWP app designed for phones. It's designed to sync data with a server running on your local home network. This syncing might take quite some time so a background task isn't the best place to sync the data; it'll probably take more than the 30 seconds I'm allotted. The idea, however, is to use a background task with a timer trigger; it'll call the server to check if there are any updates to consume and then pop up a toast notification asking if it can run in the foreground to

UWP: How to get the TaskBar Height

非 Y 不嫁゛ 提交于 2019-12-31 05:29:07
问题 I am making an UWP application.My requirement is to get the size of the TaskBar programatically (This application will run on Tablets of different resolution). After following many answers on stackoverflow(which were actually more relevant to hiding/showing the taskbar), I came through this: How do I get the taskbar's position and size? But this can't be done in case of UWP apps.Is there any other way to get the Height of the TaskBar. Please Note : The TaskBar is always visible in case of my

RichEditBox: picture and content after the picture disappear (Windows 10 1703 Creators Update)

纵饮孤独 提交于 2019-12-25 16:05:00
问题 In Windows 10 1703 Creators Update a new bug appeared. Steps to reproduce: Load an RTF document with a picture into RichEditBox Save it. Save it again. Reload it or open it with another app - you will see that the picture is gone and all the content after it is gone too. I submitted this bug here in FeedbackHub app. The question is how to avoid this bug or make a workaround? 回答1: This project on GitHub is to demonstrate the bug and to fix it. After you save the document for the 2-nd time, the