Limit Minimum Window Size #16284
-
I want to prevent user from resizing window less than specific resolution like 1280*720, I tried this but no luck MainWindow.axaml.cs
|
Beta Was this translation helpful? Give feedback.
Answered by
stevemonaco
Jul 11, 2024
Replies: 1 comment
-
Set <Window MaxWidth="1280" MaxHeight="720"
x:Class="AvaloniaApplication3.Views.MainWindow"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="using:AvaloniaApplication3.ViewModels"
Title="AvaloniaApplication3"
d:DesignHeight="450"
d:DesignWidth="800"
x:DataType="vm:MainWindowViewModel"
Icon="/Assets/avalonia-logo.ico"
mc:Ignorable="d"> |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
LSXAxeller
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Set
MaxWidth
andMaxHeight
on theWindow
instead. Works on Windows anyways. eg.