<Window
    x:Class="Demo1.View.BusModeView"
    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:local="clr-namespace:Demo1.View"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:viewModel="clr-namespace:Demo1.ViewModel"
    Name="BusModeWindow"
    Title="BusMode"
    Width="300"
    Height="160"
    Icon="/DemoLib;Component/Ressource/Logo.ico"
    WindowStartupLocation="CenterOwner"
    WindowStyle="ToolWindow"
    mc:Ignorable="d">
    <Window.DataContext>
        <viewModel:BusModeViewModel />
    </Window.DataContext>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid
            Grid.Row="0"
            Height="10"
            Background="#FFFFCC00" />
        <StackPanel
            Grid.Row="1"
            Margin="5"
            Orientation="Horizontal">
            <TextBlock
                VerticalAlignment="Center"
                FontWeight="Bold"
                Text="Reader: " />
            <TextBlock Margin="5,0" Text="{Binding Reader.Ident}" />
        </StackPanel>
        <StackPanel
            Grid.Row="2"
            Margin="5"
            Orientation="Horizontal">
            <TextBlock
                VerticalAlignment="Center"
                FontWeight="Bold"
                Text="Current Antenna: " />
            <TextBlock Margin="5,0" Text="{Binding CurrentAntenna}" />
        </StackPanel>
        <StackPanel
            Grid.Row="3"
            Margin="5"
            Orientation="Horizontal">
            <TextBlock
                VerticalAlignment="Center"
                FontWeight="Bold"
                Text="EnableAntennas: " />
            <ComboBox
                Width="180"
                Margin="5,0"
                ItemsSource="{Binding ActivatedBusHeads}"
                SelectedItem="{Binding SelectedBusHead}" />
        </StackPanel>
        <StackPanel
            Grid.Row="4"
            Margin="5"
            HorizontalAlignment="Right"
            Orientation="Horizontal">
            <Button
                Width="80"
                Margin="5,0"
                Command="{Binding SaveCommand}"
                CommandParameter="{Binding ElementName=BusModeWindow}"
                Content="Save"
                IsCancel="False"
                IsDefault="True" />
            <Button
                Width="80"
                Command="{Binding CloseCommand}"
                CommandParameter="{Binding ElementName=BusModeWindow}"
                Content="Close"
                IsCancel="True"
                IsDefault="False" />
        </StackPanel>
    </Grid>
</Window>