26 lines
1.3 KiB
XML
26 lines
1.3 KiB
XML
<UserControl x:Class="AuroraScale.CAS.UCScaleTest"
|
|
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:AuroraScale.CAS"
|
|
xmlns:view="clr-namespace:Aurora.View;assembly=Aurora"
|
|
d:DataContext="{d:DesignInstance Type=local:UCScaleTestViewModel}"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="450" d:DesignWidth="800">
|
|
<UserControl.Resources>
|
|
<!--<view:BoolConverter x:Key="convColor" TrueValue="White" FalseValue="Red"/>-->
|
|
<local:ScaleColorConverter x:Key="convColor"/>
|
|
</UserControl.Resources>
|
|
<Grid HorizontalAlignment="Left">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<Button Command="{Binding CMD_Click}" Height="30">Test</Button>
|
|
<TextBlock Grid.Row="1" Foreground="White">
|
|
Current Value : <Run Text="{Binding CurrentValue, StringFormat={}{0:0.000}}" Foreground="{Binding IsNormal, Converter={StaticResource convColor}}"/>g
|
|
</TextBlock>
|
|
</Grid>
|
|
</UserControl>
|