C00225155-02/C00225155/MegaRobo.C00225155/MegaRobo.C00225155App/MenuViews/BottleShow/PowderBottleUserControl_Sho...

40 lines
2.6 KiB
XML

<UserControl x:Class="MegaRobo.C00225155App.MenuViews.PowderBottleUserControl_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:convert="clr-namespace:MegaRobo.C00225155App.Converters"
mc:Ignorable="d"
d:DesignHeight="44" d:DesignWidth="45" Width="45" Height="44">
<UserControl.Resources>
<convert:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConvert"/>
</UserControl.Resources>
<Grid>
<StackPanel Margin="0" Background="Transparent" >
<!-- 绘制瓶子形状 -->
<Border Margin="0,0,0,0" x:Name="BottlePath"
Background="{Binding PowderBottleModel.PowderDisplayColor,RelativeSource={RelativeSource AncestorType=UserControl}}"
BorderBrush="#FFA0A0A0"
BorderThickness="1" CornerRadius="17" Height="34" Width="34" >
<TextBlock Text="{Binding PowderBottleModel.SourcePowderName,RelativeSource={RelativeSource AncestorType=UserControl}}"
FontSize="10" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<!--Background="#FFC4C2DC" Background="{Binding BorderBrushColor}" #FFA0A0A0-->
<!--" Visibility="{Binding ReactBottleModel.HaveBottle,Converter={StaticResource BooleanToVisibilityConvert}}" -->
<!-- 显示液体名称的标签 -->
<!--<TextBox x:Name="LiquidNameTextBlock" Style="{StaticResource readonlyBottleTextBoxStyle}" IsHitTestVisible="False"
Text="{Binding PowderBottleModel.SourcePowderName, RelativeSource={RelativeSource AncestorType=UserControl}}"
TextWrapping="Wrap" FontSize="10"/>-->
<!--<ProgressBar Height="11" Value="10" Width="34"/>-->
<Border BorderThickness="1" CornerRadius="2" Width="45" Height="10" Visibility="{Binding PowderBottleModel.HaveBottle,RelativeSource={RelativeSource AncestorType=UserControl},Converter={StaticResource BooleanToVisibilityConvert}}">
<TextBlock Text="{Binding PowderBottleModel.RemainWeight,StringFormat=f2,RelativeSource={RelativeSource AncestorType=UserControl}}"
HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="10"/>
</Border>
</StackPanel>
</Grid>
</UserControl>