<UserControl
    x:Class="Semi.Avalonia.Demo.Views.MainView"
    xmlns="https://github.com/avaloniaui"
    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:pages="using:Semi.Avalonia.Demo.Pages"
    d:DesignHeight="450"
    d:DesignWidth="800"
    mc:Ignorable="d">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceInclude Source="../Themes/TabMenu.axaml" />
                <ResourceInclude Source="../Themes/ToggleButton.axaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid RowDefinitions="Auto, *">
        <Border
            Margin="8"
            Padding="12,4"
            Theme="{DynamicResource CardBorder}">
            <Grid VerticalAlignment="Center" ColumnDefinitions="*, Auto">
                <StackPanel Grid.Column="0" Orientation="Horizontal">
                    <TextBlock
                        VerticalAlignment="Center"
                        Classes="H6"
                        Text="Semi Avalonia"
                        Theme="{DynamicResource TitleTextBlock}" />
                    <TextBlock
                        Margin="8,0"
                        VerticalAlignment="Center"
                        Text="/" />
                    <TextBlock
                        Margin="8,0"
                        VerticalAlignment="Center"
                        Classes="Secondary"
                        Text="{Binding #tab.SelectedItem.Header}" />
                </StackPanel>
                <ToggleSwitch
                    Grid.Column="1"
                    Padding="4"
                    IsCheckedChanged="ToggleButton_OnIsCheckedChanged"
                    Theme="{DynamicResource ButtonToggleSwitch}">
                    <ToggleSwitch.OnContent>
                        <PathIcon
                            Width="16"
                            Height="16"
                            Data="M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM17 15C17.476 15 17.9408 14.9525 18.3901 14.862C17.296 17.3011 14.8464 19 12 19C8.13401 19 5 15.866 5 12C5 8.60996 7.40983 5.78277 10.6099 5.13803C10.218 6.01173 10 6.98041 10 8C10 11.866 13.134 15 17 15Z"
                            Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
                    </ToggleSwitch.OnContent>
                    <ToggleSwitch.OffContent>
                        <PathIcon
                            Width="16"
                            Height="16"
                            Data="M3.55 19.09L4.96 20.5L6.76 18.71L5.34 17.29M12 6C8.69 6 6 8.69 6 12S8.69 18 12 18 18 15.31 18 12C18 8.68 15.31 6 12 6M20 13H23V11H20M17.24 18.71L19.04 20.5L20.45 19.09L18.66 17.29M20.45 5L19.04 3.6L17.24 5.39L18.66 6.81M13 1H11V4H13M6.76 5.39L4.96 3.6L3.55 5L5.34 6.81L6.76 5.39M1 13H4V11H1M13 20H11V23H13"
                            Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
                    </ToggleSwitch.OffContent>
                </ToggleSwitch>
            </Grid>

        </Border>
        <TabControl
            Name="tab"
            Grid.Row="1"
            Margin="8"
            Padding="20,0,0,0"
            HorizontalAlignment="Stretch"
            TabStripPlacement="Left"
            Theme="{DynamicResource NavigationTab}">
            <TabItem Header="Overview">
                <pages:Overview />
            </TabItem>
            <TabItem Header="Palette">
                <pages:PaletteDemo />
            </TabItem>
            <TabItem Header="AutoCompleteBox">
                <pages:AutoCompleteBoxDemo />
            </TabItem>
            <TabItem Header="Border">
                <pages:BorderDemo />
            </TabItem>
            <TabItem Header="Button">
                <pages:ButtonDemo />
            </TabItem>
            <TabItem Header="ButtonSpinner">
                <pages:ButtonSpinnerDemo />
            </TabItem>
            <TabItem Header="Calendar">
                <pages:CalendarDemo />
            </TabItem>
            <TabItem Header="CalendarDatePicker">
                <pages:CalendarDatePickerDemo />
            </TabItem>
            <TabItem Header="Carousel">
                <pages:CarouselDemo />
            </TabItem>
            <TabItem Header="CheckBox">
                <pages:CheckBoxDemo />
            </TabItem>
            <TabItem Header="ColorPicker">
                <pages:ColorPickerDemo />
            </TabItem>
            <TabItem Header="ComboBox">
                <pages:ComboBoxDemo />
            </TabItem>
            <TabItem Header="DataValidationErrors">
                <pages:DataValidationErrorsDemo />
            </TabItem>
            <TabItem Header="DataGrid">
                <pages:DataGridDemo />
            </TabItem>
            <TabItem Header="DatePicker">
                <pages:DatePickerDemo />
            </TabItem>
            <TabItem Header="Expander">
                <pages:ExpanderDemo />
            </TabItem>
            <TabItem Header="Flyout">
                <pages:FlyoutDemo />
            </TabItem>
            <TabItem Header="GridSplitter">
                <pages:GridSplitter />
            </TabItem>
            <TabItem Header="HeaderedContentControl">
                <pages:HeaderedContentControlDemo />
            </TabItem>
            <TabItem Header="Label">
                <pages:LabelDemo />
            </TabItem>
            <TabItem Header="ListBox">
                <pages:ListBoxDemo />
            </TabItem>
            <TabItem Header="ManagedFileChooser">
                <pages:ManagedFileChooserDemo />
            </TabItem>
            <TabItem Header="Menu">
                <pages:MenuDemo />
            </TabItem>
            <TabItem Header="Notification">
                <pages:NotificationDemo />
            </TabItem>
            <TabItem Header="NumericUpDown">
                <pages:NumericUpDownDemo />
            </TabItem>
            <TabItem Header="PathIcon">
                <pages:PathIconDemo/>
            </TabItem>
            <TabItem Header="ProgressBar">
                <pages:ProgressBarDemo />
            </TabItem>
            <TabItem Header="RadioButton">
                <pages:RadioButtonDemo />
            </TabItem>
            <TabItem Header="RefreshContainer">
                <pages:RefreshContainerDemo />
            </TabItem>
            <TabItem Header="RepeatButton">
                <pages:RepeatButtonDemo />
            </TabItem>
            <TabItem Header="ScrollViewer">
                <pages:ScrollViewerDemo />
            </TabItem>
            <TabItem Header="SelectableTextBlock">
                <pages:SelectableTextBlockDemo />
            </TabItem>
            <TabItem Header="Slider">
                <pages:SliderDemo />
            </TabItem>
            <TabItem Header="SplitView">
                <pages:SplitViewDemo />
            </TabItem>
            <TabItem Header="TabControl">
                <pages:TabControlDemo />
            </TabItem>
            <TabItem Header="TextBlock">
                <pages:TextBlockDemo />
            </TabItem>
            <TabItem Header="TextBox">
                <pages:TextBoxDemo />
            </TabItem>
            <TabItem Header="ThemeVariantScope">
                <pages:ThemeVariantDemo />
            </TabItem>
            <TabItem Header="TimePicker">
                <pages:TimePickerDemo />
            </TabItem>
            <TabItem Header="ToggleButton">
                <pages:ToggleButtonDemo />
            </TabItem>
            <TabItem Header="ToggleSwitch">
                <pages:ToggleSwitchDemo />
            </TabItem>
            <TabItem Header="ToolTip">
                <pages:ToolTipDemo />
            </TabItem>
            <TabItem Header="TreeView">
                <pages:TreeViewDemo />
            </TabItem>
        </TabControl>
    </Grid>

</UserControl>
