Posts Simple layout - 3 buttons vertically
Post
Cancel

Simple layout - 3 buttons vertically

MainWindow.xaml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<Window x:Class="SimpleLayout.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:SimpleLayout"
        mc:Ignorable="d"
        Title="MainWindow" Height="350" Width="525">
    <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
        <Button HorizontalAlignment="Left"
                Width="100"
                Margin="10,10,10,10">
            Button 1
        </Button>
        <Button HorizontalAlignment="Left"
                Width="100"
                Margin="10,10,10,10">
            Button 2
        </Button>
        <Button HorizontalAlignment="Left"
                Width="100"
                Margin="10,10,10,10">
            Button 3
        </Button>
    </StackPanel>
</Window>

SimpleLayout

This post is licensed under CC BY 4.0 by the author.