uwp-xaml

c# UWP store-app how to save file that will not be deleted after app uninstall

与世无争的帅哥 提交于 2019-12-13 02:57:39
问题 I noticed that file saved into ApplicationData.Current.LocalFolder.CreateFileAsync folder is removed after application uninstall. Is that possible to save file that will remain in user profiler after application uninstall , so when user re-install application I can read settings from file for this user ? 回答1: Only these two ways are possible: Ask your user to pick a file or a folder using FilePicker or FolderPicker and then track them in your MostRecentlyUsedList . Then you'll get the

UWP fullscreen: How to hide taskbar on hover?

此生再无相见时 提交于 2019-12-13 02:37:39
问题 When you are in "fullscreen-mode" on UWP the taskbar / window header always shows up, when you are touching the bottom / top of the display with your mouse cursor. In the UWP version of Rise of the Tomb Raider a small blue rectangle appears instead, that you have to click to show the taskbar / window header. How can I achieve a similar behaviour in my C#/XAML UWP game? Thanks! 回答1: In the UWP version of Rise of the Tomb Raider a small blue rectangle appears instead, that you have to click to

PropertyChanged is Null UWP

你说的曾经没有我的故事 提交于 2019-12-13 00:24:21
问题 Okay, before you say anything I know multiple posts of this exist and I am searching for an answer for hours. I am a new user in Stack Overflow and fairly new to C# and UWP so please feel free to correct me. I am making an UWP store application for Windows 10. I using an API and I am connecting to a server. All of that happens in a separate page of my MainPage.xaml which is loaded in a Frame ! What I want to do is to show the string connectionStatus to the MainPage.xaml (through a <TextBlock/

UWP how to show image from a network directory

[亡魂溺海] 提交于 2019-12-12 22:28:27
问题 I have tried many ways to set image source to a network directory in my UWP application. For example I have tried this example: BitmapImage bitmap = new BitmapImage(new Uri(@"\\venera\Mariner\747\03_WEDNESDAY\003\00 Flat B -\APR3783216-MED-BLK TAPE-GB-Apron.jpg")); UserImage.Source = bitmap; and bitmap.UriSource = new Uri(@"\\venera\Mariner\747\03_WEDNESDAY\003\00 Flat B -\APR3783216-MED-BLK TAPE-GB-Apron.jpg", UriKind.Absolute); UserImage.Source = bitmap; But none of them works. I ended up

Dynamically add UI elements to StackPanel after button pressed

情到浓时终转凉″ 提交于 2019-12-12 13:34:21
问题 This is my first question here :) I'm not a professional programmer, I'm only 18 and I haven't studied at university or anything, so please don't hate me if I say something stupid :p I'm making (or rather trying to make...) an app for Windows 10 UWP and a piece of my xaml code looks like this: <Grid Grid.Row="1" Grid.Column="1"> <Grid.RowDefinitions> <RowDefinition Height="12"/> <RowDefinition Height="Auto"/> <RowDefinition Height="12"/> </Grid.RowDefinitions> <Rectangle Margin="0" Grid.Row=

How to change Color define in Xaml Resources in code (UWP)

旧街凉风 提交于 2019-12-12 09:46:47
问题 [UWP] I have many grids with color binding from App.xaml MainPage.xaml ... <Grid Height="45" Margin="0,0,0,10" Background="{ThemeResource MyColor}"> App.xaml <Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" RequestedTheme="Dark"> <Application.Resources> <ResourceDictionary> <SolidColorBrush x:Key="MyColor">#FFFFFF</SolidColorBrush> Then I want to change all of its, in code like this Application.Current

Button to remove ads (in app purchase) does not disappear

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 06:15:46
问题 I'm developing a uwp app, and I have in-app advertising (only on the main page) that can be removed by clicking in a button (in app purchase). I am using CurrentAppSimulator (I am still testing) and I already have the removal of the advertising to be done successfully, but I have a problem. For example: I remove the advertising by clicking the button, then the button and the advertising disappear but if I navigate to another page of the app (for example to the settings) and return to the main

Menu button at the bottom UWP Hamburger Navigation pane

微笑、不失礼 提交于 2019-12-12 05:32:36
问题 I am currently building a hamburger menu for my UWP app build using SplitView.Pane. The "Buttons" are listBoxItems in a listBox. Is there a way to make the setting icon be located at the bottom of the SplitView.Pane like in the native windows new App...Thanks 回答1: use 2 ListBox inside a RelativePanel. in down listbox set RelativePanel.AlignBottomWithPanel="True" and when select item from the fist listbox set the selectedIndex=-1 for the other listBox <SplitView.Pane> <RelativePanel> <ListBox

How to Full Control (Read/Write) of custom resource resw file (Universal Windows)

眉间皱痕 提交于 2019-12-12 05:04:06
问题 How can I read/write Keys/Values on a custom Resource File (resw) (storing string and conditional resources) ? I added Resource File(resw) for storing settings of app. And Then ? private void button1_Click(object sender, RoutedEventArgs e) { ResourceContext resourceContext = ResourceContext.GetForViewIndependentUse(); ResourceMap resourceMap = ResourceManager.Current.MainResourceMap.GetSubtree("Resources");//resources.resw accessing in root is ok. var resourceValue = resourceMap.GetValue(

Set Width and Height of ItemsControl Children

北城余情 提交于 2019-12-12 04:27:13
问题 My CustomItemsControl looks like the following: <local:CustomItemsControl x:Name="CustomItemsControl" > <local:CustomItemsControl.ItemTemplate> <DataTemplate> <Border x:Name="rectangle" Background="Orange" CornerRadius="5" /> </DataTemplate> </local:CustomItemsControl.ItemTemplate> </local:CustomItemsControl> Depending on the amount of the items which my CustomItemsControl contain, it should calculate the Width and the Height of "Container" Items. I thought I could achieve that by calling the