uwp

how to change the font size of all text box within a grid, windows app uwp

允我心安 提交于 2019-12-06 07:34:15
I know how to develop webpages with HTML and CSS, but I am new to the windows app development and I am trying to develop an universal windows platform (UWP) application. Lets say I have grid, <Grid Name="Grid1"> <VisualStateManager.VisualStateGroups> <VisualStateGroup> <VisualState x:Name="Normal"> <VisualState.StateTriggers> <AdaptiveTrigger MinWindowWidth="600" /> </VisualState.StateTriggers> <VisualState.Setters> <Setter Target="text1.FontSize" Value="12" /> <Setter Target="text2.FontSize" Value="12" /> <Setter Target="text3.FontSize" Value="10" /> </VisualState.Setters> </VisualState> <

Disable Scaling for UWP App

巧了我就是萌 提交于 2019-12-06 07:16:04
Windows 10 automatically applies a scale factor to UWP apps, to give a similar effective pixel size across multiple devices. I want my UWP UI to look the same across any screen of the same resolution, regardless of the scale factor. Is this possible? For instance, when running my app on the Hololens it applies a 150% scale factor. This means the UI looks squished when compare to a desktop screen of a similar resolution (1280x720). A suggestion ( How to disable auto-scaling on UWP mobile ) says to use TrySetDisableLayoutScaling on the ApplicationViewScaling Class . But this doesn't work. The

Can I set the uwp app store display name to be different from the installed app display name?

好久不见. 提交于 2019-12-06 07:13:39
I would like to have a more descriptive name (for discoverability) in the Microsoft app store, but use a shorter name for the app when it is installed. I have reserved both names. I am thinking I set the App Manifest to have the short name in the Application -> Display name, and the more descriptive, store name in Packaging -> Package display name, but I don't understand the way these two names are used so I'm just guessing. Before I try this with an actual submission, I'm wondering if someone already knows if this will work. Yes, you're right. "Application -> Display name" used as a name of

HidDevice.FromIdAsync returns null with readwrite

这一生的挚爱 提交于 2019-12-06 07:12:04
问题 I am trying to port a library from classic desktop to UWP. It all works like planned except for one thing. When I try to open a HID connection to the device(A wiimote) it won't connect if the permissions are on readwrite. It does work with read only permissions. What could be the problem. The permissions in the manifest are set to the correct values. EDIT: I checked the DeviceAccessStatus to see if the permissions are not good but it returns DeviceAccessStatus.Allowed Manifest code

NTLM authentication using Windows.Web.Http.HttpClient

核能气质少年 提交于 2019-12-06 07:00:01
问题 I am working on a Windows 10 UWP app that needs to talk to a IIS server using NTLM authentication. I am setting the username and password in the HttpBaseProtocolFilter: filter.ServerCredential = new PasswordCredential(uri, UserName, Password); When i view the request in fiddler, it is using Basic Auth. Is there anything I can do to get it to use NTLM, which the server is requiring? Request Headers: Content-Length: 1459 Content-Type: text/xml; charset=utf-8 Host: server Connection: Keep-Alive

System.Threading.Thread replacement in UWP / Windows 10 mobile

♀尐吖头ヾ 提交于 2019-12-06 06:50:09
问题 In UWP, how can I access the thread object? I want to change the name of the main thread and additional thread that I will manage. I also want to check if the current thread is the main thread afterwards. I'm targeting to windows 10 mobile. The following code example works for desktop, but not for phone (getting 'System.DllNotFoundException'): [DllImport("kernel32.dll")] static extern IntPtr GetCurrentThread(); Thanks. 回答1: You should use Tasks instead of threads. https://msdn.microsoft.com

How to set the window's size in a Universal app?

倖福魔咒の 提交于 2019-12-06 06:43:13
I use C# and XAML, and my main page begins like this : <Page x:Class="MyApp.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:MyApp" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Height="754" Width="1018" MaxHeight="754" MaxWidth="1018" MinHeight="754" MinWidth="1018" mc:Ignorable="d"> <Grid> (...) </Grid> But the windows is always maximized when I start the app. Only the grid respects the size mentionned in

Flyout or Popup to display addition info

南笙酒味 提交于 2019-12-06 06:33:22
问题 I want display popup on top my app with additional information, my info is Listview with ~500 items I've tried both: problem with flyout -> it has probably scrollViewer inside so my listview doesn't Virtualize correctly everything else is ok. There is my code: Flyout myFlyout = new Flyout(); myFlyout.Placement = FlyoutPlacementMode.Full; myFlyout.Content = myListView; myFlyout.ShowAt(this); problem with popup -> it isn't centered, verticalAlignment doesn't work, horizontal neither Popup

NavigationView and additional settings button

十年热恋 提交于 2019-12-06 06:33:00
问题 I would like to add new item right before settings item (button) in NavigationView (https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/navigationview). I have no idea how to add such functionality I've tried to modify style of control but after adding button is style i had no behavior as expected. There was no navigation for that element. What I want to achieve: 回答1: You can use PaneFooter to place additional content to above the Settings button: <NavigationView>

Problems with serial device communication in UWP

帅比萌擦擦* 提交于 2019-12-06 06:18:36
问题 I have a peculiar problem. I am trying to communicate with a peripheral unit that requires serial communication in a UWP project. I am using Windows.Devices.SerialCommunication. For purpose of demonstration, I made a new page that has two buttons, with two different click handlers. One for opening the port, and other for sending messages to the peripheral. One handler is: SerialDevice device; private async void Button_Click_1(object sender, RoutedEventArgs e) { string selector = SerialDevice