I want to set the position of the window on the right side on the screen similar to WPF. Is there a way in UWP to do this?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
AFAIK it's not possible in UWP (at least not yet), you can change window size or make it fullscreen by accessing ApplicationView class, but there are no such methods/properties like in WPF.
There was also similar question on MSDN.
回答2:
Yes there is a way :) Go to your xaml for example Windows1.xaml
then put this there. Example code
<Window
x:Class="Poultry_Management_System.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Login"
Width="450"
WindowStartupLocation="CenterScreen"
WindowStyle="None"
ResizeMode="NoResize"
Topmost="True"
KeyDown="keyDown_form"
Height="200">
As you can see my StartupLocation there is in the Center.