<UserControl x:Class="MultiLayout.UcSingleGage"
      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:local="clr-namespace:MultiLayout"
        xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
      xmlns:uiModule="clr-namespace:MultiLayout.UiModule"
      mc:Ignorable="d uiModule" 
      d:DesignHeight="768" d:DesignWidth="1024"
           
      d:DataContext="{d:DesignData Source=UnitTest/FlyLayout.xaml}">
    <UserControl.Resources>

        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Converter/Converters.xaml"/>
                <ResourceDictionary Source="pack://application:,,,/MultiLayout;component/Themes/GraphTab.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>

    </UserControl.Resources>
    <Grid Background="{StaticResource Brushes.Gray5}">
        <Grid >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <!--按钮区-->
            <Grid Width="70" Background="{StaticResource Brushes.Gray1}">
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition Height="auto"/>
                </Grid.RowDefinitions>
                <StackPanel Name="stackpanel_menu" />
                <Button Grid.Row="1" Style="{StaticResource Styles.Button.Empty}" Click="button_option_click">
                    <Grid MinHeight="40" MaxHeight="150">
                        <!--有LOGO时显示LOGO-->
                        <Image Visibility="{Binding IsShowBrandPic,Converter={StaticResource visbilityconv},ConverterParameter=Collapsed}"
                               Source="{Binding BrandPic}"/>
                        <!--没有LOGO,显示图标-->
                        <iconPacks:PackIconMaterial Style="{StaticResource Styles.Icon.Base}" HorizontalAlignment="Left" Margin="{StaticResource ControlMargin}" Foreground="{StaticResource Brushes.Text.White}" 
                                                    Kind="ViewQuilt" 
                                                    Visibility="{Binding IsShowBrandPic,Converter={StaticResource visbilityconv},ConverterParameter=CollapsedWhenTrue}"/>
                    </Grid>
                </Button>
            </Grid>
            <!--状态区-->
            <Viewbox Grid.Column="1"
                        MaxWidth="{Binding DynAreaWidth}" 
                        Visibility="{Binding IsDynAreaVisible,Converter={StaticResource visbilityconv}, ConverterParameter=Collapsed}" 
                        VerticalAlignment="Top" HorizontalAlignment="Left" SnapsToDevicePixels="True" Margin="2" >
                <StackPanel Name="stackpanel_dynarea" Width="250"/>
            </Viewbox>
            <!--图表区-->
            <TabControl Grid.Column="2" Name="tabControl_graph" Template="{StaticResource GraphTab}">
                <TabItem Header="TEST"/>
                <TabItem Header="TEST2"/>
                <TabItem Header="TEST3"/>
            </TabControl>
        </Grid>
    </Grid>
</UserControl>