agrobot_base/AgroBase/OperationControl/Controls/RiskMeter.xaml

21 lines
1.3 KiB
XML

<UserControl x:Class="OperationControl.Controls.RiskMeter"
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"
mc:Ignorable="d"
d:DesignWidth="220" d:DesignHeight="26">
<Border CornerRadius="12" Padding="8,2" Background="#333" BorderBrush="#444" BorderThickness="1">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" >
<Ellipse Width="10" Height="10" Margin="0,0,6,0"
Fill="{Binding RiskBrush, RelativeSource={RelativeSource AncestorType=UserControl}}"/>
<TextBlock Text="{Binding Label, RelativeSource={RelativeSource AncestorType=UserControl}}"
Margin="0,0,6,0"/>
<TextBlock Text="{Binding Value, RelativeSource={RelativeSource AncestorType=UserControl}, StringFormat={}{0:0.0}%}"
FontWeight="Bold" Margin="0,0,6,0"/>
<TextBlock Text="{Binding SecondaryText, RelativeSource={RelativeSource AncestorType=UserControl}}"
Foreground="#CCC"/>
</StackPanel>
</Border>
</UserControl>