<UserControl x:Class="FLY.FilmCasting.AutoDie.UI.Client.UiModule.DynAreaAutoDie"
      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:FLY.FilmCasting.AutoDie.UI.Client.UiModule"
      xmlns:client="clr-namespace:FLY.FilmCasting.AutoDie.UI.Client"
      mc:Ignorable="d" 
      d:DesignWidth="292">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
                <ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Converter/Dictionary_MyConv.xaml"/>
            </ResourceDictionary.MergedDictionaries>

            <client:StableConverter x:Key="stableconv"/>
            <local:DynAreaAutoDieVmUt x:Key="airRingVmUt" Msg="0123" CurrR="0.8" LastChangedTime="12:30"/>
        </ResourceDictionary>

    </UserControl.Resources>
    <Grid>
        <Button x:Name="grid_viewModel" Style="{StaticResource Styles.Button.Empty}" Command="{Binding OpenRecordCmd}"
                d:DataContext="{StaticResource airRingVmUt}">
            <Grid >
                <Border Style="{StaticResource Styles.Module.Border}" >
                    <Grid Margin="5">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="auto"/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <StackPanel >
                            <StackPanel Orientation="Horizontal">
                                <StackPanel Margin="2" >
                                    <TextBlock Text="稳定性" FontSize="12" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Left"  Foreground="#FF3B3B3B" />
                                    <TextBlock   FontWeight="Bold" FontFamily="Microsoft Sans Serif" Foreground="{StaticResource Color_theme_activity}" Text="{Binding CurrR, StringFormat={}{0:F1}}" FontSize="24" VerticalAlignment="Center" />
                                </StackPanel>
                            </StackPanel>
                            <StackPanel Margin="2" >
                                <TextBlock Text="加热时间" FontSize="10" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Left" Foreground="#FF3B3B3B" Margin="0,2"/>
                                <TextBlock Text="{Binding LastChangedTime,StringFormat={}{0:HH:mm:ss}}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" Foreground="White" Background="Black" Padding="5,0" />
                            </StackPanel>
                        </StackPanel>

                        <Viewbox Grid.Column="1" MaxHeight="80" Margin="2" >
                            <TextBlock  VerticalAlignment="Center" TextWrapping="Wrap" Foreground="{StaticResource Color_theme_static}" Text="{Binding Msg}" MaxWidth="71"/>
                        </Viewbox>

                    </Grid>

                </Border>
            </Grid>
        </Button>
    </Grid>

</UserControl>
