win-universal-app

Get Variations of Accent color in UWP

别说谁变了你拦得住时间么 提交于 2019-12-22 06:57:10
问题 I'm trying to get a lighter variation of accent color using theme resource SystemAccentColorLight1 SystemAccentColorLight2 ... I'm getting this exception: The text associated with this error code could not be found. Cannot find a Resource with the Name/Key SystemAccentColorLight1 [Line: 15 Position: 19] <Grid Background="{ThemeResource ResourceKey= SystemAccentColorLight1}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Padding="5"> <Grid.ColumnDefinitions> <ColumnDefinition Width=

How to access downloads folder in windows phone 8.1

荒凉一梦 提交于 2019-12-22 06:24:10
问题 I want to download files to Downloads folder and read. it is a root folder like photos and videos. But Windows.Storage.DownloadsFolder isn't available for phone and I don't see it in KnownFolders like Windows.Storage.KnownFolders.PicturesLibrary; Also I tried C:\Data\Users\Public\Downloads\ it gives an unauthorized result. I see some apps has access to it, but how? 回答1: You can use a file or folder picker. I'm not sure if you want the user to chose a file, or if you want to pick a file

How to access downloads folder in windows phone 8.1

﹥>﹥吖頭↗ 提交于 2019-12-22 06:23:08
问题 I want to download files to Downloads folder and read. it is a root folder like photos and videos. But Windows.Storage.DownloadsFolder isn't available for phone and I don't see it in KnownFolders like Windows.Storage.KnownFolders.PicturesLibrary; Also I tried C:\Data\Users\Public\Downloads\ it gives an unauthorized result. I see some apps has access to it, but how? 回答1: You can use a file or folder picker. I'm not sure if you want the user to chose a file, or if you want to pick a file

Universal app - Loading combobox' ItemsSource async gives weird behaviour

流过昼夜 提交于 2019-12-22 05:14:21
问题 While working on an Universal App (currently only on the WP8.1-side), I've stumbled upon the following weird thing. I've got a ComboBox, the UserControl (located in the WindowsPhone-project) it's in is binded to a VM in the Shared project. Both the ItemsSource and SelectedItem are binded to their respective properties in the VM. When running the application, when you select any item except the first one, it is working perfectly. But, when I select the first item, the string displayed in the

How to connect W10 Universal App with MySQL database

走远了吗. 提交于 2019-12-22 05:06:12
问题 I'm writing my first Windows 10 Universal App that operates on MySql database. I used code from this guide (It's for Windows 8 store apps): https://blogs.oracle.com/MySqlOnWindows/entry/how_to_using_connector_net But when I try to open connection with my database I get error: An exception of type 'System.NotImplementedException' occurred in >MySql.Data.RT.dll but was not handled in user code Additional information: SSL not supported in this WinRT release. public class DBconnector { static

UWP: async read file into byte[]

半城伤御伤魂 提交于 2019-12-22 04:56:24
问题 I want to read a locally stored file into a byte array. How do I do that? This is my try: StorageFolder folder = await StorageFolder.GetFolderFromPathAsync(filePath); var file = await folder.GetFileAsync(filePath); var buffer = await FileIO.ReadBufferAsync(file); DataReader dataReader = Windows.Storage.Streams.DataReader.FromBuffer(buffer); // doesn't work because ReadBytes wants a byte[] as parameter and also isn't asynchronous byte[] result = dataReader.ReadBytes(buffer.Length); 回答1:

UWP: async read file into byte[]

元气小坏坏 提交于 2019-12-22 04:56:02
问题 I want to read a locally stored file into a byte array. How do I do that? This is my try: StorageFolder folder = await StorageFolder.GetFolderFromPathAsync(filePath); var file = await folder.GetFileAsync(filePath); var buffer = await FileIO.ReadBufferAsync(file); DataReader dataReader = Windows.Storage.Streams.DataReader.FromBuffer(buffer); // doesn't work because ReadBytes wants a byte[] as parameter and also isn't asynchronous byte[] result = dataReader.ReadBytes(buffer.Length); 回答1:

how to change background color of button in UWP Apps in c# ?

旧城冷巷雨未停 提交于 2019-12-22 04:21:23
问题 I have a simple and I need to change colors of my buttons every second in that . I use this code btnBlue.Background = new SolidColorBrush(Windows.UI.Colors.Blue) But it doesn't contain my custom color that I have use in xaml like #FF30B3DD ! So what should I do ? can anybody help me ? 回答1: You can use Color.FromArgb() to define a custom color in code: btnBlue.Background = new SolidColorBrush(Color.FromArgb(255, 48, 179, 221)); Alternatively, you can define the color in XAML in advance as a

Show flyout using BottomAppBar

a 夏天 提交于 2019-12-22 03:59:29
问题 I'm trying to show a simple Flyout (with informational content) when a AppBarToggleButton within BottomAppBar is pressed, but my solution doesn't work. :( This is my code: <Page.BottomAppBar> <CommandBar> <AppBarToggleButton x:Uid="MapPageAppBarLegend" Label="" Icon="List"> <FlyoutBase.AttachedFlyout> <Flyout> <TextBlock Text="Informations here..."/> </Flyout> </FlyoutBase.AttachedFlyout> </AppBarToggleButton> </CommandBar> </Page.BottomAppBar> Nothing appears.. Can anyone help me to showing

How to add a new XAML View with code behind

ⅰ亾dé卋堺 提交于 2019-12-22 02:06:08
问题 I am using VS 2015, creating a Univerasl App. I want to create a new view (XAML). I can right click, Add > XAML > XAML View, and the XAML gets created with the name and location that I want. But, how can I create a code behind here, e.g. MyNewView.xaml.cs, and "link it up" as a child node in my solution explorer? 回答1: As RavingDev said: Do not use "XAML View", instead use "Blank Page" or "User Control". On a side note, if you want to manually create a code file and link it with anything else