123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- <UserControl
- x:Class="ShakerApp.Views.OilAnalogView"
- xmlns="https://github.com/avaloniaui"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="using:ShakerApp"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:vm="using:ShakerApp.ViewModels"
- Height="140"
- d:DesignHeight="450"
- d:DesignWidth="800"
- x:DataType="vm:OilSourceAnalogViewModel"
- mc:Ignorable="d">
- <StackPanel
- MinWidth="220"
- HorizontalAlignment="Center"
- VerticalAlignment="Center">
- <StackPanel
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Orientation="Horizontal">
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="36"
- Foreground="{StaticResource OilDefaultColor}"
- Text="{local:ResourceBinding Name}" />
- <PathIcon
- Width="32"
- Height="24"
- Margin="10,0,0,0"
- VerticalAlignment="Center"
- Classes.IsError="{Binding IsError}"
- Classes.IsWarn="{Binding IsWarn}"
- Data="M16,0 L32,24 L0,24Z"
- IsVisible="{Binding IsUpper}">
- <PathIcon.Styles>
- <Style Selector="PathIcon">
- <Setter Property="Foreground" Value="{StaticResource OilDefaultColor}" />
- </Style>
- <Style Selector="PathIcon.IsError">
- <Setter Property="Foreground" Value="{StaticResource ErrorColor}" />
- </Style>
- <Style Selector="PathIcon.IsWarn">
- <Setter Property="Foreground" Value="{StaticResource WarnColor}" />
- </Style>
- </PathIcon.Styles>
- </PathIcon>
- <PathIcon
- Width="32"
- Height="24"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Classes.IsError="{Binding IsError}"
- Classes.IsWarn="{Binding IsWarn}"
- Data="M0,0 L32,0 L16,24Z"
- IsVisible="{Binding IsLower}">
- <PathIcon.Styles>
- <Style Selector="PathIcon">
- <Setter Property="Foreground" Value="{StaticResource OilDefaultColor}" />
- </Style>
- <Style Selector="PathIcon.IsError">
- <Setter Property="Foreground" Value="{StaticResource ErrorColor}" />
- </Style>
- <Style Selector="PathIcon.IsWarn">
- <Setter Property="Foreground" Value="{StaticResource WarnColor}" />
- </Style>
- </PathIcon.Styles>
- </PathIcon>
- </StackPanel>
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Classes.IsError="{Binding IsError}"
- Classes.IsWarn="{Binding IsWarn}"
- FontSize="74"
- FontWeight="Bold">
- <Run Text="{Binding Value, StringFormat='{}{0:0.00} '}" />
- <Run Text="{Binding Unit}" />
- <TextBlock.Styles>
- <Style Selector="TextBlock">
- <Setter Property="Foreground" Value="{StaticResource OilDefaultColor}" />
- </Style>
- <Style Selector="TextBlock.IsError">
- <Setter Property="Foreground" Value="{StaticResource ErrorColor}" />
- </Style>
- <Style Selector="TextBlock.IsWarn">
- <Setter Property="Foreground" Value="{StaticResource WarnColor}" />
- </Style>
- </TextBlock.Styles>
- </TextBlock>
- </StackPanel>
- </UserControl>
|