Greetings!
I created a small window in XAML in a WPF project where Design view is perfect, but when I run the application in Debug mode the window changes size alone. What do I do to make the window size not change?
Below are the screen prints for ease of understanding.
Design time
Debugtime
XAMLCode
<Windowx:Class="WpfApp1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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:local="clr-namespace:WpfApp1"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="500" WindowStartupLocation="CenterScreen" ResizeMode="NoResize">
<Grid Margin="0">
<Button Content="Button" HorizontalAlignment="Left" Margin="10,291,0,0" VerticalAlignment="Top" Width="75"/>
<Button Content="Button" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="75"/>
<Button Content="Button" HorizontalAlignment="Left" Margin="409,10,0,0" VerticalAlignment="Top" Width="75"/>
<Button Content="Button" HorizontalAlignment="Left" Margin="409,291,0,0" VerticalAlignment="Top" Width="75"/>
</Grid>
</Window>
Thank you in advance.
Hugs to all!