<UserControl x:Class="MegaRobo.C00225155App.MenuViews.SampleBottleUserControl_Show"
             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:MegaRobo.C00225155App.MenuViews"
             xmlns:loca="clr-namespace:MegaRobo.C00225155App.MenuViews.Bottles"
             xmlns:convert="clr-namespace:MegaRobo.C00225155App.Converters"
             mc:Ignorable="d" 
             d:DesignHeight="36" d:DesignWidth="74" Width="74" Height="36">
    <UserControl.Resources>
        <convert:ReactBottleBoxToBrushConverter x:Key="ReactBottleToBrushConvert"/>
        <convert:DivisionConverter  x:Key="DivisionConverter"/>
        <convert:InverseDivisionConverter x:Key="InverseDivisionConverter"/>
        <convert:BooleanToVisibilityConverter x:Key="booleanToVisibilityConverter"/>
    </UserControl.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="30"/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <StackPanel Margin="0" Background="Transparent" >
            <!-- 绘制瓶子形状 -->
            <Border Margin="0,4,0,0" x:Name="BottlePath"  
                    Background="{Binding SampleBottleModel.DisplayColor,RelativeSource={RelativeSource AncestorType=UserControl}}"  BorderBrush="LightGray"  
                    BorderThickness="1" CornerRadius="14" Height="28" Width="28">
                <TextBlock  Text="{Binding SampleBottleModel.ReactContentName,RelativeSource={RelativeSource AncestorType=UserControl}}" 
                            FontSize="10" VerticalAlignment="Center" HorizontalAlignment="Center" />
            </Border>
        </StackPanel>
        <StackPanel Grid.Column="1" >
            <loca:CircleProgress  x:Name="MyCircleProgress"  Foreground="Black"
                                  Progress="{Binding SampleBottleModel.ProgressPercentage,RelativeSource={RelativeSource AncestorType=UserControl}}"
                                  Visibility="{Binding SampleBottleModel.HaveBottle,RelativeSource={RelativeSource AncestorType=UserControl},Converter={StaticResource booleanToVisibilityConverter}}" StrokeThickness="8" Height="35" Width="35" HorizontalAlignment="Center"  VerticalAlignment="Center">
                <!--<loca:CircleProgress.Progress>
                    <MultiBinding Converter="{StaticResource InverseDivisionConverter}">
                        <Binding Path="ReactBottleModel.RemainDuration" 
                           RelativeSource="{RelativeSource AncestorType=UserControl}"/>
                        <Binding Path="ReactBottleModel.EstimatedDuration" 
                           RelativeSource="{RelativeSource AncestorType=UserControl}"/>
                    </MultiBinding>
                </loca:CircleProgress.Progress>-->
            </loca:CircleProgress>
        </StackPanel>
    </Grid>
</UserControl>
