1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
| <Window x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Test_Auto_size_text"
mc:Ignorable="d"
Title="MainWindow" Height="218.959" Width="48.001">
<Grid Margin="2">
<Grid Margin="5" >
<Grid.RowDefinitions>
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
</Grid.RowDefinitions>
<Border BorderBrush="{Binding BORDER_General_BorderBrush, FallbackValue='Black'}"
BorderThickness="{Binding BORDER_General_BorderThickness, FallbackValue='2'}"
CornerRadius="1" Height="Auto" Width="Auto"
Grid.Row="0" >
<Border.Background>
<RadialGradientBrush>
<GradientStop Color="{Binding Installed_Color1}" Offset="0.358"/>
<GradientStop Color="{Binding Installed_Color2}" Offset="1"/>
</RadialGradientBrush>
</Border.Background>
<TextBlock Background="Transparent"
Foreground= "{Binding TXT_Title_Foreground,FallbackValue='Black'}"
FontSize="{Binding TXT_Title_Fontsize,FallbackValue='9'}"
Margin="0,1,0,1" TextAlignment="Right" VerticalAlignment ="Center"
Text="{Binding Installed_Text, FallbackValue=''}"/>
</Border>
<Border BorderBrush="{Binding BORDER_General_BorderBrush, FallbackValue='Black'}"
BorderThickness="{Binding BORDER_General_BorderThickness, FallbackValue='2'}"
CornerRadius="1"
Grid.Row="1" >
<Border.Background>
<RadialGradientBrush>
<GradientStop Color="{Binding Logged_Color1}" Offset="0.358"/>
<GradientStop Color="{Binding Logged_Color2}" Offset="1"/>
</RadialGradientBrush>
</Border.Background>
<TextBlock Background="Transparent"
Foreground= "{Binding TXT_Title_Foreground,FallbackValue='Black'}"
FontSize="{Binding TXT_Title_Fontsize,FallbackValue='9'}"
Margin="0,1,0,1" TextAlignment="Right" VerticalAlignment ="Center"
Text="{Binding Logged_Text, FallbackValue=''}"/>
</Border>
<Border BorderBrush="{Binding BORDER_General_BorderBrush, FallbackValue='Black'}"
BorderThickness="{Binding BORDER_General_BorderThickness, FallbackValue='2'}"
CornerRadius="1"
Grid.Row="2">
<Border.Background>
<RadialGradientBrush>
<GradientStop Color="{Binding Idle_Color1}" Offset="0.358"/>
<GradientStop Color="{Binding Idle_Color2}" Offset="1"/>
</RadialGradientBrush>
</Border.Background>
<TextBlock Background="Transparent"
Foreground= "{Binding TXT_Title_Foreground,FallbackValue='Black'}"
FontSize="{Binding TXT_Title_Fontsize,FallbackValue='9'}"
Margin="0,1,0,1" TextAlignment="Right" VerticalAlignment ="Center"
Text="{Binding Idle_Text, FallbackValue=''}"/>
</Border>
<Border BorderBrush="{Binding BORDER_General_BorderBrush, FallbackValue='Black'}"
BorderThickness="{Binding BORDER_General_BorderThickness, FallbackValue='2'}"
CornerRadius="1"
Grid.Row="3" >
<Border.Background>
<RadialGradientBrush>
<GradientStop Color="{Binding NotDetected_Color1}" Offset="0.358"/>
<GradientStop Color="{Binding NotDetected_Color2}" Offset="1"/>
</RadialGradientBrush>
</Border.Background>
<TextBlock Background="Transparent"
Foreground= "{Binding TXT_Title_Foreground,FallbackValue='Black'}"
FontSize="{Binding TXT_Title_Fontsize,FallbackValue='9'}"
Margin="0,1,0,1" TextAlignment="Right" VerticalAlignment ="Center"
Text="{Binding NotDetected_Text, FallbackValue=''}"/>
</Border>
<Border BorderBrush="{Binding BORDER_General_BorderBrush, FallbackValue='Black'}"
BorderThickness="{Binding BORDER_General_BorderThickness, FallbackValue='2'}"
CornerRadius="1"
Grid.Row="4" >
<Border.Background>
<RadialGradientBrush>
<GradientStop Color="{Binding MajorAlarm_Color1}" Offset="0.358"/>
<GradientStop Color="{Binding MajorAlarm_Color2}" Offset="1"/>
</RadialGradientBrush>
</Border.Background>
<TextBlock Background="Transparent"
Foreground= "{Binding TXT_Title_Foreground,FallbackValue='Black'}"
FontSize="{Binding TXT_Title_Fontsize,FallbackValue='9'}"
Margin="0,1,0,1" TextAlignment="Right" VerticalAlignment ="Center"
Text="{Binding MajorAlarm_Text, FallbackValue=''}"/>
</Border>
<Border BorderBrush="{Binding BORDER_General_BorderBrush, FallbackValue='Black'}"
BorderThickness="{Binding BORDER_General_BorderThickness, FallbackValue='2'}"
CornerRadius="1"
Grid.Row="5">
<Border.Background>
<RadialGradientBrush>
<GradientStop Color="{Binding MinorAlarm_Color1}" Offset="0.358"/>
<GradientStop Color="{Binding MinorAlarm_Color2}" Offset="1"/>
</RadialGradientBrush>
</Border.Background>
<TextBlock Background="Transparent"
Foreground= "{Binding TXT_Title_Foreground,FallbackValue='Black'}"
FontSize="{Binding TXT_Title_Fontsize,FallbackValue='9'}"
Margin="0,1,0,1" TextAlignment="Right" VerticalAlignment ="Center"
Text="{Binding MinorAlarm_Text, FallbackValue=''}"/>
</Border>
<Border BorderBrush="{Binding BORDER_General_BorderBrush, FallbackValue='Black'}"
BorderThickness="{Binding BORDER_General_BorderThickness, FallbackValue='2'}"
Background="{Binding BORDER_General_Background,FallbackValue='Gray'}"
CornerRadius="1"
Grid.Row="6"
Height="Auto" Width="Auto">
<Viewbox Stretch="Uniform">
<TextBlock Background="Transparent" Height="Auto" Width="Auto"
Foreground= "{Binding TXT_Current_Foreground,FallbackValue='Yellow'}"
FontSize="{Binding TXT_Current_Fontsize,FallbackValue='Auto'}"
TextAlignment="{Binding TXT_General_Alignement, FallbackValue='Center'}" VerticalAlignment ="Center"
Text="{Binding Current, FallbackValue='30,20'}"/>
</Viewbox>
</Border>
<Border BorderBrush="{Binding BORDER_General_BorderBrush, FallbackValue='Black'}"
BorderThickness="{Binding BORDER_General_BorderThickness, FallbackValue='2'}"
Background="{Binding BORDER_General_Background,FallbackValue='Gray'}"
CornerRadius="1"
Grid.Row="7">
<TextBlock Background="Transparent"
Foreground= "{Binding TXT_Temperature_Foreground,FallbackValue='Yellow'}"
FontSize="{Binding TXT_Temperature_Fontsize,FallbackValue='9'}"
Margin="0,1,0,1" TextAlignment="{Binding TXT_General_Alignement, FallbackValue='Center'}" VerticalAlignment ="Center"
Text="{Binding Temperature, FallbackValue='- - -'}"/>
</Border>
<Border BorderBrush="{Binding BORDER_General_BorderBrush, FallbackValue='Black'}"
BorderThickness="{Binding BORDER_General_BorderThickness, FallbackValue='2'}"
Background="{Binding BORDER_General_Background,FallbackValue='Gray'}"
CornerRadius="1"
Grid.Row="8" >
<TextBlock Background="Transparent"
Foreground= "{Binding TXT_Tension_Foreground,FallbackValue='Yellow'}"
FontSize="{Binding TXT_Tension_Fontsize,FallbackValue='9'}"
Margin="0,1,0,1" TextAlignment="{Binding TXT_General_Alignement, FallbackValue='Center'}" VerticalAlignment ="Center"
Text="{Binding Tension, FallbackValue='- - -'}"/>
</Border>
<Border BorderBrush="{Binding BORDER_General_BorderBrush, FallbackValue='Black'}"
BorderThickness="{Binding BORDER_General_BorderThickness, FallbackValue='2'}"
Background="{Binding BORDER_General_Background,FallbackValue='Gray'}"
CornerRadius="1"
Grid.Row="9" >
<TextBlock Background="Transparent"
Foreground= "{Binding TXT_Tension_Foreground,FallbackValue='Yellow'}"
FontSize="{Binding TXT_Id_Fontsize,FallbackValue='10'}"
Margin="0,1,0,1" TextAlignment="Center" VerticalAlignment ="Center"
Text="{Binding Idx, FallbackValue='- - -'}"/>
</Border>
</Grid>
</Grid>
</Window> |
Partager