uwp

Loading Html file in WebView in xaml in UWP from app data local folder

a 夏天 提交于 2019-12-17 18:56:56
问题 I have a requirement where I need to load an html file from app data folder in xaml WebView in UWP. Html file is also referencing different Js files in another folder ("99/js/"). Any one with UWP knowledge guide me. Thanks in advance I am using following code, Browser is my WebView. var Uri = new Uri("ms-appdata:///Local/Downloads/99/index.html"); Browser.Navigate(Uri); My folder structure in 99 folder is: udapte I am trying load html file in offline to WebView which is not loading same html

How to use ListView in Universal Windows Platform (Windows 10 app)

谁说我不能喝 提交于 2019-12-17 18:29:14
问题 Can anyone please explain ItemTemplate.DataTemplate and ListView . In this code snippet. I really don't understand the concept of Templates , it will be help full if someone might put some light on that too. I had look to this question: Metro app: ListView ItemTemplate DataTemplate for selected item But still confused. Thank you! :( <ListView Margin="10" Name="lvDataBinding"> <ListView.ItemTemplate> <DataTemplate> <WrapPanel> <TextBlock Text="Name: " /> <TextBlock Text="{Binding Name}"

C# change app language programmatically UWP realtime

倖福魔咒の 提交于 2019-12-17 18:18:12
问题 In my application for each language string resources are stored separately and are displayed depending of type of language environment. I want to change the language in the application settings. How do I realize that after the language selection instantly apply it in the user interface? 回答1: We can use ApplicationLanguages.PrimaryLanguageOverride to change the language during runtime without restart the app. For example: I have two languages supported "en" and "fr", localized message will

When to use a templated control over a UserControl?

故事扮演 提交于 2019-12-17 17:34:42
问题 I was looking some tutorials on how to create custom controls in WinRT, and I have a question. Let's say I want to create a simple control that contains some stuff, like a Grid with an image on the left and a couple of TextBlocks on the right. I mean, something simple like: <Grid Height="100"> <Grid.ColumnDefinitions> <ColumnDefinition Width="0.3*"/> <ColumnDefinition Width="0.7*"/> </Grid.ColumnDefinitions> <Image Source"/Assets/someRandomImage.png"/> <StackPanel Grid.Column="1"

.Net regex matching $ with the end of the string and not of line, even with multiline enabled

一世执手 提交于 2019-12-17 16:49:38
问题 I'm trying to highlight markdown code, but am running into this weird behavior of the .NET regex multiline option. The following expression: ^(#+).+$ works fine on any online regex testing tool: But it refuses to work with .net: It doesn't seem to take into account the $ tag, and just highlights everything until the end of the string, no matter what. This is my C# RegExpression = new Regex(@"^(#+).+$", RegexOptions.Multiline) What am I missing? 回答1: It is clear your text contains a linebreak

Error : DEP6200 : Bootstrapping 'Device' failed. Device cannot be found

Deadly 提交于 2019-12-17 16:33:37
问题 I've read every StackOverflow that I could find on this issue, but I still can't work it out. I'm trying to deploy an app to actual device ( NOT emulator). But I receive the following error when i try to build: Severity Code Description Project File Line Error Error : DEP6100 : The following unexpected error occurred during bootstrapping stage 'Connecting to the device '30F105C9-681E-420b-A277-7C086EAD8A4E'.': SEHException - External component has thrown an exception. App1 and Severity Code

Error : DEP6200 : Bootstrapping 'Device' failed. Device cannot be found

拜拜、爱过 提交于 2019-12-17 16:33:02
问题 I've read every StackOverflow that I could find on this issue, but I still can't work it out. I'm trying to deploy an app to actual device ( NOT emulator). But I receive the following error when i try to build: Severity Code Description Project File Line Error Error : DEP6100 : The following unexpected error occurred during bootstrapping stage 'Connecting to the device '30F105C9-681E-420b-A277-7C086EAD8A4E'.': SEHException - External component has thrown an exception. App1 and Severity Code

Load UWP library into .NET Framework app

瘦欲@ 提交于 2019-12-17 16:29:32
问题 There are a number of articles(codeproject, blog1, blog2, forum) to use WinRT library into .Net Framework console application in Windows 8. I tried it with UWP in Windows 10. But failed to make it. I struggled to compile without error, but it occurred BadImageFormatException in runtime. This is what I did. Create Console application with .NET Framework 4.6.1 target. Edit .csproj file to add <TargetPlatformVersion>10.0</TargetPlatformVersion> Reference three libraries as below. c:\Program

Overriding Pivot header foreground brushes in UWP app (Win 10 RTM SDK)

随声附和 提交于 2019-12-17 16:26:13
问题 I'm trying to override the Pivot header foreground theme brushes, but no matter what I do the UWP app just ignores it. Just to be clear, this question is about the UWP Pivot control, not the Win (Phone) 8.1 one. I've used the theme brush override method in a 8.1 app and it worked perfectly. But I can't seem to be able to do the same for a UWP Pivot. I looked for the respective brushes in generic.xaml (and in the Properties pane under Brushes -> System Brush Resources), which are

Controller support for Xbox one in Windows UWP

给你一囗甜甜゛ 提交于 2019-12-17 16:16:16
问题 I am wondering how I am supposed to handle input for UWP apps targeting Xbox One. I have noticed DirectInput, but I see two issues with it for my use cases: From MSDN, it only seems to support Xbox 360 controllers XInput is an API that allows applications to receive input from the Xbox 360 Controller for Windows. Controller rumble effects and voice input and output are supported. DirectX and all of its API's (Direct2d, Direct3D, Xinput, etc...) are only supported on C / C++. That means even