windows-10-universal

Can't upgrade settings when updating a WPF Desktop Bridge Universal app

两盒软妹~` 提交于 2021-01-27 06:57:07
问题 My app is written in WPF C# and I export it as Universal app using MSIX Application Project straight from Visual Studio. I just can't get the settings to persist between updates. I'm using the following code in the MainWindow_Loaded event: Settings.Default.Upgrade(); Settings.Default.Save(); Settings.Default.Reload(); I tried keeping assembly information versions the same and just increment the version in the appx.manifest but it doesn't work. I've noticed that each time the app updates it

Display message when ListView contains no items with MVVM in a UWP

[亡魂溺海] 提交于 2021-01-21 08:33:37
问题 This is my first MVVM project and the code I need to write to manipulate controls in the view somehow seems way too complicated than it has to be. I'm finding it hard to fully understand MVVM and to decide when I can put stuff in code behind. Basically my problem is that I want to show a message telling the user that the listview is empty when the ObservableCollection it is bound to contains no items. The idea was to have a TextBlock in the view and only have its visibility property set to

UWP Check If File Exists

Deadly 提交于 2020-12-30 04:54:23
问题 I am currently working on a Windows 10 UWP App. The App needs to Check if a certain PDF File exists called "01-introduction", and if so open it. I already have the code for if the file does not exist. The Code Below is what i currently have: try { var test = await DownloadsFolder.CreateFileAsync("01-Introduction.pdf", CreationCollisionOption.FailIfExists); } catch { } This code Does not work correctly because to check if the file exists here, I attempt to create the file. However if the file

How to change selection highlight colour of a ListBoxItem in UWP?

浪子不回头ぞ 提交于 2020-07-20 03:34:32
问题 I want to change the selection highlight color of a ListBoxItem The split view pane on the left has a ListBox containing the ListBoxItems.The default selection colour is blue and I want to customize it but I'm not able to change it. I couldn't find any property to change the selection highlight color of a ListBoxItem in UWP. 回答1: You can change the style of ListBoxItem to change the selection highlight color.In the style,you should change all the states that contanin ' Selected ' key word to

Write to file in uwp that has been drag-dropped from explorer

旧街凉风 提交于 2020-07-09 05:55:24
问题 If file is dragged and dropped from file explorer it has FileAttributes.ReadOnly flag for StorageFile.Attributes parameter. In that case using StorageFile api to write to file will give error. How to write to file in this case?? 回答1: In this case PathIO api can be used to write to file (unless file is a system file). Convert data to write into bytes array and then add following code to write to file: await PathIO.WriteBytesAsync(file.Path, bytes); This will write to these files without any

What are the famous apps that are built using UWP?

流过昼夜 提交于 2020-06-09 05:37:17
问题 I am building a UWP(universal windows platform) app, I am looking for famous apps that are built using UWP. I want to look at their UI etc for reference. I came to know that calculator app we are using in our PCs is a UWP app. I want to know some more famous UWP apps in market that are available in store or elsewhere to check them. twitter, flipkart used to be UWP apps previously. But they changed to (Progressive Web Apps)PWA. reference: https://www.windowscentral.com/twitter-updates-its

VisualStateManager for UI Responsive is not working in UWP

旧巷老猫 提交于 2020-05-26 09:25:11
问题 in my uwp desktop application. I have crated one user control for header. for responsive UI i am using the VisualStateManager But its not working when i am resizing the page.i want to keep moving right hand side controls to left when i am resizing the page.this code working in some situation. I want to reduce the middle blank space size when i am resize the window. thanks in advance :) <UserControl x:Class="UWPUIResponsive.UC_Header" xmlns="http://schemas.microsoft.com/winfx/2006/xaml

Windows 10 Store: You cannot submit pre-compiled .NET Native packages

烈酒焚心 提交于 2020-04-11 04:07:08
问题 I'm trying to release my application targetting Windows 10 (Universal Windows) based in Cordova to existing Windows Phone 8.1 store record. After generating app package through Store - Create App Packages I get 19 MB file named CordovaApp.Windows10_1.3.2.0_x86_x64_arm.appxbundle . Then I upload this file to App Packages and get. CordovaApp.Windows10_1.3.2.0_x86_x64_arm.appxbundle 18.9 MB Package acceptance validation error: You cannot submit pre-compiled .NET Native packages. Please upload