<UserControl x:Class="InputSamples.C1TagEditorPage"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"
             xmlns:res="clr-namespace:InputSamples.Strings"
             xmlns:local="clr-namespace:InputSamples"
             mc:Ignorable="d" DataContext="{Binding RelativeSource={RelativeSource Mode=Self}}"
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <local:TextDisplayModeConverter x:Key="TextDisplayModeConverter"/>
        <local:ContentDisplayModeConverter x:Key="ContentDisplayModeConverter"/>
    </UserControl.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Grid Margin="5">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition />
            </Grid.RowDefinitions>
            <c1:C1TagEditor Margin="5" DisplayMode="Tag" x:Name="TagEditor" Height="70" VerticalAlignment="Top" TagWrapping="True" PlaceHolder="Enter Tag"/>
            <Grid Margin="5" Grid.Row="1" VerticalAlignment="Top">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <TextBlock Margin="5" Text="{Binding ElementName=TagEditor,Path=DisplayMode,Converter={StaticResource TextDisplayModeConverter}}" VerticalAlignment="Center" />
                <TextBox x:Name="AddInput" Grid.Row="1" Margin="5" VerticalAlignment="Center"/>
                <Button Margin="5" Content="{Binding ElementName=TagEditor,Path=DisplayMode,Converter={StaticResource ContentDisplayModeConverter}}" Click="OnAddButtonClick" Grid.Row="2" VerticalAlignment="Center" />
            </Grid>
        </Grid>
        <c1:C1TabControl UnselectedContentMode="Collapsed" Grid.Column="1">
            <c1:C1TabItem Header="{x:Static res:Resources.PropertiesTabHeader}">
                <c1:C1PropertyGrid SelectedObject="{Binding ElementName=TagEditor}" AddingPropertyBox="C1PropertyGrid_AddingPropertyBox" DefaultCategoryName="Miscellaneous" />
            </c1:C1TabItem>
            <c1:C1TabItem Header="{x:Static res:Resources.EventsTabHeader}">
                <StackPanel Orientation="Vertical">
                    <c1:C1Expander Header="{x:Static res:Resources.TagEditedEventExpenderHeader}" ExpandDirection="Down" IsExpanded="True">
                        <TextBlock x:Name="EditedTagContent" Text="{x:Static res:Resources.TagEdited}" VerticalAlignment="Center" Margin="5"/>
                    </c1:C1Expander>
                    <c1:C1Expander Header="{x:Static res:Resources.TagInsertedEventExpenderHeader}" ExpandDirection="Down" IsExpanded="True">
                        <TextBlock x:Name="AddTagContent" Text="{x:Static res:Resources.TagAdd}" VerticalAlignment="Center" Margin="5"/>
                    </c1:C1Expander>
                    <c1:C1Expander Header="{x:Static res:Resources.TextEditedEventExpenderHeader}" ExpandDirection="Down" IsExpanded="True">
                        <TextBlock x:Name="EditedTextContent" Text="{x:Static res:Resources.TextEdited}" VerticalAlignment="Center" Margin="5"/>
                    </c1:C1Expander>
                </StackPanel>
            </c1:C1TabItem>
        </c1:C1TabControl>
    </Grid>
</UserControl>
