uwp

Change MetroLog folder and file name in Windows 10 UWP app

…衆ロ難τιáo~ 提交于 2020-01-07 03:26:06
问题 Wondering if anybody has experience using MetroLog on a Windows 10 UWP app. I am not too familiar with it and just started using it. For the purpose of not duplicating code and creating a long post, I followed this walk through step by step. The question I have is a simple one though. With this guide and the default implementation of MetroLog, the log files are stored in a folder named "MetroLog" within my app local folder. Furthermore, the file name is just named "log - 20170206.log" I want

Access Webview inside Gridview datatemplate

假如想象 提交于 2020-01-07 03:12:11
问题 I have Webview as one of the control inside Gridview datatemplate. How would i access and bind data to this Webview inside Gridview. I have tried VisualTreeHelper.GetChildren method. But could not succeed. Please help. 回答1: Able to resolve with same VisualTreeHelper.GetChildren method. Previously i was parsing child controls as Control type. Since WebView is a Framework element I did not get WebView control. Now when I try to parse as FramewoekElement, I am able to get it. Still wondering if

Changing the Overlay background color for ContentDialog

爱⌒轻易说出口 提交于 2020-01-07 02:56:47
问题 For my UWP app, I want to override the default theme of the background color of the screen around the content dialog when it opens. I tried doing what's mentioned in this answer but it didn't work for me: https://stackoverflow.com/a/32159659/2858235 My OS build # is 10586. I read somewhere that this solution is no more working for builds equal and above 10586. Is there any solution? 回答1: For me, my SDK version is 14393 (Anniversary) and the SolidColorBrush resource to override is

How to disable auto-scaling on UWP mobile

别来无恙 提交于 2020-01-07 02:48:09
问题 I´m doing a Windows Universal app that will run only on Lumia 640XL devices. That device has a native resolution of 1280 x 720 and a pixel density of 259 ppi. There will be no desktop version so I just care about the mobile layout. The design guide lines for my app are huge and full of pixel measures (sizes, margins, paddings, font sizes) everywhere, so what I´d like is to make the mobile app respect the physical pixels (rather than "effective pixels"), as the desktop version does. How can I

Error display json data on gridview ItemClick

雨燕双飞 提交于 2020-01-07 02:28:16
问题 I have problems when displaying data by taking data from JSON (arrays in the array). That is when the gridview selected, then immediately exit the application and will display an error message, as below: Code: private BukuAudio itemDetail = null; public async void StoreAll() { try { var client = new Windows.Web.Http.HttpClient(); string urlPath = "website"; var values = new List<KeyValuePair<string, string>> { }; var response = await client.PostAsync(new Uri(urlPath), new Windows.Web.Http

FindPackagesForCurrentPublisher in Windows 10 for PC

天涯浪子 提交于 2020-01-07 02:23:32
问题 Is there a way to use or an alternative to InstallationManager.FindPackagesForCurrentPublisher? It looks like it is only for the phone. I know you can launch an app by creating and then launching a URI, but I need to know if the app I want to launch is installed. EDIT: The app I want to launch is by the same publisher. 回答1: If we use the LaunchUriAsync(Uri) method to launch an app, system will firstly try to launch the installed app which registered this protocol, if the target app is not

UWP - How to bind a ContentPresenter's element to the main ViewModel?

纵然是瞬间 提交于 2020-01-07 02:18:34
问题 I work on an app where the user can edit a "big" form: The form contains a lot of fields: it is displayed in a Pivot , where each PivotItem represents a category of the form. Some categories contain one or more child items: they are displayed through a Master-Detail presentation. To display the items of the Detail part, I use a ContentPresenter that is binded directly to the Model: <ContentPresenter x:Name="DetailContentPresenter" Grid.Column="1" Grid.RowSpan="2" BorderThickness="1,0,0,0"

Access music files UWP -KnownFolders.MusicLibrary.GetItemsAsync() doesnt return anything

醉酒当歌 提交于 2020-01-07 01:23:11
问题 Hey i have the following : var fileList = await KnownFolders.MusicLibrary.GetItemsAsync(); It doesn't return any files and i have files in the Music folder. I also have : <Capabilities> <Capability Name="internetClient" /> <Capability Name="removableStorage" /> <Capability Name="documentsLibrary" /> <Capability Name="MusicLibrary" /> <Capability Name="HomeGroup" /> <Capability Name="RemovableDevices" /> I dont know why it doesnt return any files/ exception ? Any suggestions ? I also tried

Set Font size to richtexblock in uwp dynamically

烂漫一生 提交于 2020-01-06 21:11:28
问题 I have the following code: <ScrollViewer x:Name="swipeBetweenPages" Grid.Row="1"> <Pivot DataContext="{StaticResource ViewModel}" x:Name="pivot" Margin="0,-45,0,0" HeaderTemplate="{StaticResource headerTest}" ItemTemplate="{StaticResource pivotTemplate}" ItemsSource="{Binding Articles}" SelectionChanged="pivot_SelectionChanged"> </Pivot> </ScrollViewer> <Page.Resources> <ViewModels:ArticleViewModel x:Key="ViewModel" /> <DataTemplate x:Key="headerTest"> </DataTemplate> <DataTemplate x:Key=

Set Font size to richtexblock in uwp dynamically

我的梦境 提交于 2020-01-06 21:11:18
问题 I have the following code: <ScrollViewer x:Name="swipeBetweenPages" Grid.Row="1"> <Pivot DataContext="{StaticResource ViewModel}" x:Name="pivot" Margin="0,-45,0,0" HeaderTemplate="{StaticResource headerTest}" ItemTemplate="{StaticResource pivotTemplate}" ItemsSource="{Binding Articles}" SelectionChanged="pivot_SelectionChanged"> </Pivot> </ScrollViewer> <Page.Resources> <ViewModels:ArticleViewModel x:Key="ViewModel" /> <DataTemplate x:Key="headerTest"> </DataTemplate> <DataTemplate x:Key=