My XAML:
我的XAML:
<Window x:Class="Newsletter.UI.MessagesWindow"
xmlns="https://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="https://schemas.microsoft.com/winfx/2006/xaml"
Title="MessagesWindow" Name="messagesWindow" Height="576" Width="1024" WindowStartupLocation="CenterScreen" Closed="MessagesWindowClosed">
<Window.Resources>
<Style TargetType="{x:Type Button}">
<Setter Property="Width" Value="149"/>
<Setter Property="Margin" Value="10"/>
</Style>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="75"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Button Name="saveButton" Grid.Row="0" Content="Save" Margin="10,10,10,5"/>
<TextBox Name="searchTextBox" Grid.Row="1" Margin="10,5,10,10"/>
</Grid>
<Button Name="recipientsButton" Content="RECIPIENTS" Click="RecipientsButtonClick" />
<Button Name="createButton" Content="CREATE" Click="CreateButtonClick" />
<Button Name="removeButton" Content="REMOVE" />
<Button Name="editButton" Content="EDIT" />
<Button Name="resendButton" Content="RESEND"/>
</StackPanel>
<DataGrid Name="gridMessages" Grid.Row="1"/>
</Grid>
</Window>
<Window x:Class="Newslette