C00225155-02/C00225155/MegaRobo.C00225155/MegaRobo.C00225155App/MenuViews/Bottles/SampleBottleUserControl.xaml

38 lines
2.3 KiB
XML

<UserControl x:Class="MegaRobo.C00225155App.MenuViews.SampleBottleUserControl"
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="40" d:DesignWidth="76" Width="76" Height="40"
x:Name="rootControl">
<UserControl.Resources>
<convert:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConvert" />
<convert:ReactBoolToBackgroundConverter x:Key="reactboolToBrushColorConvert" />
<convert:DivisionConverter x:Key="DivisionConverter"/>
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="40"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<StackPanel Margin="0" Background="Transparent" >
<Border Margin="0,2,0,0" x:Name="BottlePath"
Background="{Binding SampleBottleModel.HaveBottle,RelativeSource={RelativeSource AncestorType=UserControl},Converter={StaticResource reactboolToBrushColorConvert}}"
BorderBrush="LightGray"
BorderThickness="2" CornerRadius="18" Height="36" Width="36" MouseLeftButtonDown="Bottle_MouseLeft">
<TextBlock Text="{Binding SampleBottleModel.PosId_InBox,RelativeSource={RelativeSource AncestorType=UserControl}}"
FontSize="10" VerticalAlignment="Center" HorizontalAlignment="Center" />
</Border>
</StackPanel>
<StackPanel Grid.Column="1" Visibility="{Binding ElementName=rootControl,Path=SampleBottleModel.HaveBottle,Converter={StaticResource BooleanToVisibilityConvert }}">
<loca:CTIndicator x:Name="MyCTIndicator" CTValue="{Binding ElementName=rootControl,Path=SampleBottleModel.EstimatedDuration}" Height="40" Width="33"/>
</StackPanel>
</Grid>
</UserControl>