我希望将窗口的位置设置在屏幕右侧,类似于 WPF。在UWP中有没有这样做的方法?
是的,有一种方法 :) 前往您的xaml,例如Windows1.xaml
然后将以下内容放入其中。示例代码
<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">
正如您所看到的,我的StartupLocation位于中心。