How to set Windows position at startup

I want to set the position of the window on the right side on a screen similar to WPF . Is there a way in UWP to do this?

+4
source share
2 answers

AFAIK is not possible in UWP (at least for now), you can resize the window or make it full-screen by calling the ApplicationView class, but there are no methods / properties like in WPF.

There was also a similar question on the MSDN .

+2
source

Yes, there is a way :) Go to your xaml, for example, Windows1.xaml

then put it there. Code example

 <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 .

-2

Source: https://habr.com/ru/post/1669011/


All Articles