uwp

How to obtain keyboard layout for Microsoft Edge and other windows hosted in ApplicationFrameHost.exe

女生的网名这么多〃 提交于 2019-12-11 02:04:31
问题 As we all know, Windows's keyboard layouts are thread-specific. When a layout changes, a message is dispatched to the foreground thread by the shell. So if one wants to obtain the most recent system-wide keyboard layout, one must do something like this: const HWND foregroundWindow = ::GetForegroundWindow(); const DWORD foregroundThread = ::GetWindowThreadProcessId(foregroundWindow, NULL); const HKL layout = ::GetKeyboardLayout(foregroundThread); This works fine for most native Windows apps.

UWP : Get the current UserName to provide rights to the user

陌路散爱 提交于 2019-12-11 01:56:42
问题 For an app that I develop for a customer, I need to get the current user details. Then I must assign rights by comparing the couple " domain\login " to a table containing all the authorized users. I reuse the code given by @Sergiu Cojocaru here , that I have mixed with an official sample (UserInfo) to get more details: IReadOnlyList<Windows.System.User> users = await Windows.System.User.FindAllAsync(); var current = users.Where(u => u.AuthenticationStatus == Windows.System

UWP navigation (Template10), Pivot control, multiple frames

拟墨画扇 提交于 2019-12-11 01:52:22
问题 I'm trying to implement the following style of navigation in my UWP app (using Template10) but am struggling how to use the multiple frames as independent history stacks. Within each frame of the pivot, I'd want to have an independent frame that has it's own history and back stack. Navigating between the frames would only be possible via the pivot. I was thinking of using code similar to the below: <Pivot> <PivotItem Header="PageA"> <Frame x:Name="PageAFrame" /> </PivotItem> <PivotItem Header

UWP TextBox Text binding not working

主宰稳场 提交于 2019-12-11 01:35:58
问题 I am having some problems with a TextBox.Text binding in UWP. I have been doing WPF for years and typically know what I'm doing in XAML but can't get this binding to work... I have a TextBox and a Button in the same scope in the XAML <StackPanel Orientation="Horizontal" Margin="0,10,0,0"> <TextBox Width="200" Text="{Binding SearchText, UpdateSourceTrigger=PropertyChanged}"/> <Button Margin="10,0,0,0" Command="{Binding SearchBusCommand}">Go</Button> </StackPanel> And the bound properties are

UWP XAML Change Style of a target with VisualStateManager

♀尐吖头ヾ 提交于 2019-12-11 01:33:05
问题 I´m using Style to custom my components: <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center"> <StackPanel.Resources> <Style TargetType="Button"> <Setter Property="Height" Value="80"/> <Setter Property="Width" Value="80"/> <Setter Property="Margin" Value="10"/> </Style> </StackPanel.Resources> <Button Content="Listas"/> <Button Content="Filas"/> <Button Content="Pilhas"/> <

How to add Microsoft.NET.CoreRuntime.2.1 for UWP package installer?

寵の児 提交于 2019-12-11 01:32:19
问题 I have Xamarin Application. I can build ipa, APK and UWP(.appx) package. ipa and APK is working fine. I am facing issue while installing UWP. Issue with UWP: It is asking to install Microsoft.NET.CoreRuntime.2.1 as it is one of the dependencies. Do I need to add Microsoft.NET.CoreRuntime.2.1 in project? If so, where? Can anybody please suggest? I gave created package with following steps 1: Right click UWP project-> Store-> Select create app packages 2: Now in debug mode we don't need to

How to create camera mask in C# for UWP

萝らか妹 提交于 2019-12-11 01:19:01
问题 I have searched the net but can't find an answer and need some help. I am creating a mobile HR program and need to provide a profile mask to the camera so that the user knows what distance to be at to take a picture of the person and to ensure all photos look the same. What I would like to do is when the user clicks a button show the camera and have an area blacked out so that only the transparent section shows the focus of the camera in the desired shape. If anyone knows where sample code is

How to generate a link directing to all apps of a publisher in microsoft store?

不羁岁月 提交于 2019-12-11 01:18:14
问题 I'm a uwp developer, and I have published 4 apps in Microsoft store. Now I want to add a button, which can open the store page published by me. Like below. How? Thanks :) 回答1: There is another schema available for WinStore for filtering by publisher Here is example "ms-windows-store://publisher/?name=Printslon" Launches a search for products from the specified publisher. Spaces in the name are allowed. https://docs.microsoft.com/en-us/windows/uwp/launch-resume/launch-store-app 回答2: First of

UWP XmlSerializer PlatformNotSupportedException

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 01:14:55
问题 I'm using XmlSerializer in a UWP project. It works fine when compiled for debug but throws PlatformNotSupportedException in release. I've written a simple example C# program to illustrate this. I have not edited any project settings from what VS 2017 has given me. I have a simple SampleData.xml file in the project as Content. I have classes called SampleItemsForSerialization along with SampleItemList and SampleItem, all marked up to be able to serialize the xml file. In another class I have

Does UWP app support ajax?

末鹿安然 提交于 2019-12-11 00:57:36
问题 I have a windows 8 hybrid app and now I want to migrate it to UWP. I am facing two issues and I have been searching on the internet for quite a few time. I want to know if UWP support ajax function. Also my anchor tag in href is not parsing. What might be the reason. 回答1: I want to know if UWP support ajax function The answer is yes, you can use ajax in UWP Application. But there are a few things you need to notice when using ajax in UWP. If you are using ajax to get data from a remote server