<Page
    x:Class="BxlUniversalTestAPP.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:BxlUniversalTestAPP"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    NavigationCacheMode="Enabled">

    <RelativePanel Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup>
                <VisualState>
                    <VisualState.StateTriggers>
                        <AdaptiveTrigger MinWindowWidth="600" />
                    </VisualState.StateTriggers>

                    <VisualState.Setters>
                        <Setter Target="mainSplitview.DisplayMode" Value="Inline" />
                        <Setter Target="mainSplitview.IsPaneOpen" Value="True" />
                    </VisualState.Setters>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>

        <Button x:Name="SplitViewButton" Background="Transparent" Padding="0,-6" Margin="12" Click="SplitViewButton_Click">
            <FontIcon FontFamily="{ThemeResource ContentControlThemeFontFamily}" Glyph="&#x2261;" FontSize="32" Margin="0,-8,0,0" />
        </Button>

        <TextBlock Margin="2,11,9,-1" Style="{ThemeResource BodyTextBlockStyle}" Text="Bixolon Windows SDK Sample" Foreground="OrangeRed"
                   RelativePanel.RightOf="SplitViewButton" TextWrapping="Wrap" FontSize="18.667" />

        <SplitView x:Name="mainSplitview" PaneBackground="{ThemeResource ApplicationPageBackgroundThemeBrush}" Margin="0,5,0,0"
                   RelativePanel.Below="SplitViewButton" RelativePanel.AlignRightWithPanel="True" RelativePanel.AlignLeftWithPanel="True"
                   IsPaneOpen="False" DisplayMode="overlay" OpenPaneLength="220">
            <SplitView.Pane>
                <ListView x:Name="MenuListView" SelectionChanged="MenuListView_SelectionChanged" HorizontalAlignment="Left">
                    <ListViewItem>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="Connect to printer" VerticalAlignment="Center" Margin="5,0,0,0" />
                        </StackPanel>
                    </ListViewItem>
                    <ListViewItem>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="Printing Test" VerticalAlignment="Center" Margin="5,0,0,0" />
                        </StackPanel>
                    </ListViewItem>
                    <ListViewItem>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="Page Mode Test" VerticalAlignment="Center" Margin="5,0,0,0" />
                        </StackPanel>
                    </ListViewItem>
                    <ListViewItem>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="MSR Test" VerticalAlignment="Center" Margin="5,0,0,0" />
                        </StackPanel>
                    </ListViewItem>
                    <ListViewItem>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="SCR Test" VerticalAlignment="Center" Margin="5,0,0,0" />
                        </StackPanel>
                    </ListViewItem>
                </ListView>
            </SplitView.Pane>

            <ContentControl x:Name="mainContentPC" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5" HorizontalContentAlignment="Stretch" />
        </SplitView>
    </RelativePanel>
</Page>
