For example, I have such code:
<Window x:Class="_2._Layout.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:_2._Layout"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="647">
<DockPanel LastChildFill="True">
<Button DockPanel.Dock="Top" Background="AliceBlue" Content="Top button" />
<Button DockPanel.Dock="Left" Background="Aquamarine" Content="Left button" />
<Button DockPanel.Dock="Right" Background="DarkGreen" Content="Right button" />
<Button DockPanel.Dock="Bottom" Background="BlanchedAlmond" Content="Bottom button" />
<Button Background="LightGreen" Content="Center" />
</DockPanel>
</Window>
So such view:
When I change the size of the window, elements in DockPanel change their sizes:
But I want to prevent their size changing so they just hide. How can I do it? Maybe some property of DockPanel? Fixed size?
I’m a noob in this theme, so sorry if the question is silly.
1