Pessoal, é o seguinte, comecei a me aventurar a poucos dias no "mundo" WPF. A possibilidade de poder customizar os componentes da forma que quiser, separar o código da interface, entre outros, me chamou muito a atenção e, dessa forma, resolvi migrar
do WF para o WPF.
Bom, estou tentando entender como funciona a estrutura dos componentes no XAML e melhores práticas para aplicar nos meus futuros projetos. Fazendo alguns testes, eu estruturei uma janela dessa forma:
<Window x:Class="PointSale.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:PointSale"
mc:Ignorable="d"
WindowState="Maximized"
WindowStyle="None"
Title="MainWindow" Width="1366" Height="768">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Background="BlueViolet">
</StackPanel>
<Grid Grid.Row="1" Background="#eee">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="540"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="35"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Background="#ccc">
</StackPanel>
<StackPanel Grid.Row="1" Background="#fff">
</StackPanel>
</Grid>
<Grid Grid.Column="0">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="150"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0">
</StackPanel>
<StackPanel Grid.Row="1" Background="#31C858">
</StackPanel>
</Grid>
</Grid>
</Grid>
</Window>
Isso estaria certo? Há formas melhores para organizar os elementos no layout?