Skip to content

Limit Minimum Window Size #16284

Closed Answered by stevemonaco
LSXAxeller asked this question in Q&A
Discussion options

You must be logged in to vote

Set MaxWidth and MaxHeight on the Window instead. Works on Windows anyways. eg.

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

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by LSXAxeller
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants