【发布时间】:2017-06-24 06:44:43
【问题描述】:
我想将窗口在屏幕右侧的位置设置为类似于WPF。 UWP 中有没有办法做到这一点?
【问题讨论】:
标签: c# visual-studio uwp windows-10-universal
我想将窗口在屏幕右侧的位置设置为类似于WPF。 UWP 中有没有办法做到这一点?
【问题讨论】:
标签: c# visual-studio uwp windows-10-universal
AFAIK 这在 UWP 中是不可能的(至少现在还不可能),您可以通过访问 ApplicationView 类来更改窗口大小或使其全屏显示,但没有像 中这样的方法/属性em>WPF.
【讨论】:
是的,有一种方法 :) 转到您的 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 位于中心。
【讨论】: