1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <UserControl
- x:Class="ShakerApp.Views.OilMinView"
- 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:suki="https://github.com/kikipoulet/SukiUI"
- xmlns:vm="using:ShakerApp.ViewModels"
- d:DesignHeight="450"
- d:DesignWidth="150"
- x:DataType="vm:OilSourceStatusViewModel"
- DataContext="{Binding Source={x:Static vm:OilSourceStatusViewModel.Instance}}"
- mc:Ignorable="d">
- <Expander ExpandDirection="Down">
- <Expander.Header>
- <TextBlock
- FontSize="24"
- FontWeight="Bold"
- Text="{DynamicResource OilStatus}" />
- </Expander.Header>
- <ItemsControl ItemsSource="{Binding OilSourceAnalogs}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <StackPanel>
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="24"
- Foreground="{StaticResource OilDefaultColor}"
- Text="{local:ResourceBinding Name}" />
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Classes.IsError="{Binding IsError}"
- Classes.IsWarn="{Binding IsWarn}"
- FontSize="26"
- 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>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </Expander>
- </UserControl>
|