|
14 | 14 | <local:ECGMonitorViewModel/> |
15 | 15 | </Grid.DataContext> |
16 | 16 |
|
| 17 | + <Grid.Resources> |
| 18 | + <Style TargetType="Border" x:Key="borderStyle"> |
| 19 | + <Setter Property="BorderThickness" Value="2"/> |
| 20 | + <Setter Property="BorderBrush" Value="#e3e2df"/> |
| 21 | + <Setter Property="Background" Value="#0a1f53"/> |
| 22 | + <Setter Property="Padding" Value="20"/> |
| 23 | + <Setter Property="CornerRadius" Value="10"/> |
| 24 | + </Style> |
| 25 | + |
| 26 | + <Style TargetType="TextBlock" x:Key="bindingTextStyle"> |
| 27 | + <Setter Property="FontSize" Value="28"/> |
| 28 | + <Setter Property="FontWeight" Value="Bold"/> |
| 29 | + <Setter Property="Foreground" Value="#2ac145"/> |
| 30 | + <Setter Property="TextAlignment" Value="Right"/> |
| 31 | + </Style> |
| 32 | + |
| 33 | + <Style TargetType="TextBlock" x:Key="staticTextStyle"> |
| 34 | + <Setter Property="FontSize" Value="16"/> |
| 35 | + <Setter Property="FontWeight" Value="Bold"/> |
| 36 | + <Setter Property="Foreground" Value="#e3e2df"/> |
| 37 | + <Setter Property="TextAlignment" Value="Right"/> |
| 38 | + </Style> |
| 39 | + |
| 40 | + <Style TargetType="TextBlock" x:Key="timeIndicatorTextStyle"> |
| 41 | + <Setter Property="FontSize" Value="16"/> |
| 42 | + <Setter Property="VerticalAlignment" Value="Bottom"/> |
| 43 | + <Setter Property="Foreground" Value="#FFFFFF"/> |
| 44 | + <Setter Property="HorizontalAlignment" Value="Left"/> |
| 45 | + </Style> |
| 46 | + |
| 47 | + <Style TargetType="Path" x:Key="iconStyle"> |
| 48 | + <Setter Property="Stretch" Value="Uniform"/> |
| 49 | + <Setter Property="Fill" Value="#FFFFFFFF"/> |
| 50 | + <Setter Property="Width" Value="60"/> |
| 51 | + <Setter Property="Height" Value="60"/> |
| 52 | + <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/> |
| 53 | + <Setter Property="HorizontalAlignment" Value="Left"/> |
| 54 | + <Setter Property="VerticalAlignment" Value="Top"/> |
| 55 | + |
| 56 | + </Style> |
| 57 | + </Grid.Resources> |
| 58 | + |
17 | 59 | <Grid.RowDefinitions> |
18 | 60 | <!-- Define rows for different sections --> |
19 | 61 | <RowDefinition Height="2.2*" /> |
|
31 | 73 | </Grid.ColumnDefinitions> |
32 | 74 |
|
33 | 75 | <!-- ECG Monitor Title --> |
34 | | - <Border Grid.Row="0" Grid.Column="0" Background="#0a1f53" BorderBrush="#e3e2df" BorderThickness="2" CornerRadius="10" Padding="20" Margin="0,0,10,10"> |
| 76 | + <Border Grid.Row="0" Grid.Column="0" Margin="0,0,10,10" Style="{StaticResource borderStyle}"> |
35 | 77 | <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center"> |
36 | 78 | <Image Source="/Images/electrocardiogram.png" Width="80" Height="80" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="20,0" /> |
37 | 79 | <TextBlock Text="Electrocardiogram Monitor" FontSize="35" FontWeight="Bold" Foreground="#e3e2df" VerticalAlignment="Center"/> |
38 | 80 | </StackPanel> |
39 | 81 | </Border> |
40 | 82 |
|
41 | 83 | <!-- Blood Pressure Metric --> |
42 | | - <Border BorderBrush="#e3e2df" BorderThickness="2" Background="#0a1f53" Grid.Row="0" Grid.Column="1" CornerRadius="10" Padding="20" Margin="0,0,10,10"> |
| 84 | + <Border Grid.Row="0" Grid.Column="1" Margin="0,0,10,10" Style="{StaticResource borderStyle}"> |
43 | 85 | <Grid> |
44 | 86 | <!-- Define columns for icon and text --> |
45 | 87 | <Grid.ColumnDefinitions> |
46 | 88 | <ColumnDefinition Width="3.5*"/> |
47 | 89 | <ColumnDefinition Width="6.5*"/> |
48 | 90 | </Grid.ColumnDefinitions> |
49 | | - <Path x:Name="bloodPressure" Stretch="Uniform" Fill="#FFFFFFFF" Width="60" Height="60" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left" VerticalAlignment="Top"/> |
50 | | - <TextBlock Text="35 min" FontSize="16" HorizontalAlignment="Left" VerticalAlignment="Bottom" Foreground="White"/> |
| 91 | + <Path x:Name="bloodPressure" Style="{StaticResource iconStyle}"/> |
| 92 | + <TextBlock Text="35 min" Style="{StaticResource timeIndicatorTextStyle}"/> |
51 | 93 | <StackPanel Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Vertical"> |
52 | | - <TextBlock Text="{Binding BloodPressure}" FontSize="28" FontWeight="Bold" Foreground="#2ac145" TextAlignment="Right"/> |
53 | | - <TextBlock Text="Blood Pressure" FontSize="16" FontWeight="Bold" Foreground="#e3e2df" TextAlignment="Right"/> |
| 94 | + <TextBlock Text="{Binding BloodPressure}" Style="{StaticResource bindingTextStyle}"/> |
| 95 | + <TextBlock Text="Blood Pressure" Style="{StaticResource staticTextStyle}"/> |
54 | 96 | </StackPanel> |
55 | 97 | </Grid> |
56 | 98 | </Border> |
57 | 99 |
|
58 | 100 | <!-- Body Temperature Metric --> |
59 | | - <Border BorderBrush="#e3e2df" BorderThickness="2" Background="#0a1f53" Grid.Row="0" Grid.Column="2" CornerRadius="10" Padding="20" Margin="0,0,0,10"> |
| 101 | + <Border Grid.Row="0" Grid.Column="2" Margin="0,0,0,10" Style="{StaticResource borderStyle}"> |
60 | 102 | <Grid> |
61 | 103 | <!-- Define columns for icon and text --> |
62 | 104 | <Grid.ColumnDefinitions> |
63 | 105 | <ColumnDefinition Width="5*"/> |
64 | 106 | <ColumnDefinition Width="5*"/> |
65 | 107 | </Grid.ColumnDefinitions> |
66 | | - <Path x:Name="bodyTemperature" Stretch="Uniform" Fill="#FFFFFFFF" Width="60" Height="60" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left" VerticalAlignment="Top"/> |
67 | | - <TextBlock Text="120 min" FontSize="16" HorizontalAlignment="Left" VerticalAlignment="Bottom" Foreground="White"/> |
| 108 | + <Path x:Name="bodyTemperature" Style="{StaticResource iconStyle}"/> |
| 109 | + <TextBlock Text="120 min" Style="{StaticResource timeIndicatorTextStyle}"/> |
68 | 110 | <StackPanel Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Vertical"> |
69 | | - <TextBlock Text="{Binding BodyTemperature}" FontSize="28" FontWeight="Bold" Foreground="#2ac145" TextAlignment="Right"/> |
70 | | - <TextBlock Text="Body Temperature" FontSize="16" FontWeight="Bold" Foreground="#e3e2df" TextAlignment="Right"/> |
| 111 | + <TextBlock Text="{Binding BodyTemperature}" Style="{StaticResource bindingTextStyle}"/> |
| 112 | + <TextBlock Text="Body Temperature" Style="{StaticResource staticTextStyle}"/> |
71 | 113 | </StackPanel> |
72 | 114 | </Grid> |
73 | 115 | </Border> |
|
77 | 119 | <!-- Metric Panels --> |
78 | 120 | <UniformGrid Grid.Row="1" Columns="4" HorizontalAlignment="Stretch"> |
79 | 121 | <!-- Heart Rate Panel --> |
80 | | - <Border BorderBrush="#e3e2df" BorderThickness="2" Background="#0a1f53" CornerRadius="10" Padding="20" Margin="0,0,10,10"> |
| 122 | + <Border Margin="0,0,10,10" Style="{StaticResource borderStyle}"> |
81 | 123 | <Grid> |
82 | 124 | <!-- Define columns for icon and text --> |
83 | 125 | <Grid.ColumnDefinitions> |
84 | 126 | <ColumnDefinition Width="5*"/> |
85 | 127 | <ColumnDefinition Width="5*"/> |
86 | 128 | </Grid.ColumnDefinitions> |
87 | | - <Path x:Name="heartRate" Stretch="Uniform" Fill="#FFFFFFFF" Width="60" Height="60" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left" VerticalAlignment="Top"> |
| 129 | + <Path x:Name="heartRate" Style="{StaticResource iconStyle}"> |
88 | 130 | <Path.RenderTransform> |
89 | 131 | <ScaleTransform x:Name="HeartScaleTransform" ScaleX="1" ScaleY="1"/> |
90 | 132 | </Path.RenderTransform> |
91 | 133 | </Path> |
92 | | - <TextBlock Text="now" FontSize="16" HorizontalAlignment="Left" VerticalAlignment="Bottom" Foreground="White"/> |
| 134 | + <TextBlock Text="now" Style="{StaticResource timeIndicatorTextStyle}"/> |
93 | 135 | <StackPanel Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Vertical"> |
94 | | - <TextBlock Text="{Binding HeartRate}" FontSize="28" FontWeight="Bold" Foreground="#2ac145" TextAlignment="Right"/> |
95 | | - <TextBlock Text="Heart Rate" FontSize="16" FontWeight="Bold" Foreground="#e3e2df" TextAlignment="Right"/> |
| 136 | + <TextBlock Text="{Binding HeartRate}" Style="{StaticResource bindingTextStyle}"/> |
| 137 | + <TextBlock Text="Heart Rate" Style="{StaticResource staticTextStyle}"/> |
96 | 138 | </StackPanel> |
97 | 139 | <Grid.Triggers> |
98 | 140 | <!-- Animation for heartbeat effect --> |
|
115 | 157 | </Border> |
116 | 158 |
|
117 | 159 | <!-- PR Interval Panel --> |
118 | | - <Border BorderBrush="#e3e2df" BorderThickness="2" Background="#0a1f53" CornerRadius="10" Padding="20" Margin="0,0,10,10"> |
| 160 | + <Border Margin="0,0,10,10" Style="{StaticResource borderStyle}"> |
119 | 161 | <Grid> |
120 | 162 | <Grid.ColumnDefinitions> |
121 | 163 | <!-- Define columns for icon and text --> |
122 | 164 | <ColumnDefinition Width="5*"/> |
123 | 165 | <ColumnDefinition Width="5*"/> |
124 | 166 | </Grid.ColumnDefinitions> |
125 | | - <Path x:Name="PrInterval" Stretch="Uniform" Fill="#FFFFFFFF" Width="60" Height="60" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left" VerticalAlignment="Top"/> |
126 | | - <TextBlock Text="now" FontSize="16" HorizontalAlignment="Left" VerticalAlignment="Bottom" Foreground="White"/> |
| 167 | + <Path x:Name="PrInterval" Style="{StaticResource iconStyle}"/> |
| 168 | + <TextBlock Text="now" Style="{StaticResource timeIndicatorTextStyle}"/> |
127 | 169 | <StackPanel Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Vertical"> |
128 | | - <TextBlock Text="{Binding PRInterval}" FontSize="28" FontWeight="Bold" Foreground="#2ac145" TextAlignment="Right"/> |
129 | | - <TextBlock Text="PR Interval" FontSize="16" FontWeight="Bold" Foreground="#e3e2df" TextAlignment="Right"/> |
| 170 | + <TextBlock Text="{Binding PRInterval}" Style="{StaticResource bindingTextStyle}"/> |
| 171 | + <TextBlock Text="PR Interval" Style="{StaticResource staticTextStyle}"/> |
130 | 172 | </StackPanel> |
131 | 173 | </Grid> |
132 | 174 | </Border> |
133 | 175 |
|
134 | 176 | <!-- QT Interval Panel --> |
135 | | - <Border BorderBrush="#e3e2df" BorderThickness="2" Background="#0a1f53" CornerRadius="10" Padding="20" Margin="0,0,10,10"> |
| 177 | + <Border Margin="0,0,10,10" Style="{StaticResource borderStyle}"> |
136 | 178 | <Grid> |
137 | 179 | <Grid.ColumnDefinitions> |
138 | 180 | <!-- Define columns for icon and text --> |
139 | 181 | <ColumnDefinition Width="5*"/> |
140 | 182 | <ColumnDefinition Width="5*"/> |
141 | 183 | </Grid.ColumnDefinitions> |
142 | | - <Path x:Name="QtInterval" Stretch="Uniform" Fill="#FFFFFFFF" Width="60" Height="60" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left" VerticalAlignment="Top"/> |
143 | | - <TextBlock Text="now" FontSize="16" HorizontalAlignment="Left" VerticalAlignment="Bottom" Foreground="White"/> |
| 184 | + <Path x:Name="QtInterval" Style="{StaticResource iconStyle}"/> |
| 185 | + <TextBlock Text="now" Style="{StaticResource timeIndicatorTextStyle}"/> |
144 | 186 | <StackPanel Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Vertical"> |
145 | | - <TextBlock Text="{Binding QTInterval}" FontSize="28" FontWeight="Bold" Foreground="#2ac145" TextAlignment="Right"/> |
146 | | - <TextBlock Text="QT Interval" FontSize="16" FontWeight="Bold" Foreground="#e3e2df" TextAlignment="Right"/> |
| 187 | + <TextBlock Text="{Binding QTInterval}" Style="{StaticResource bindingTextStyle}"/> |
| 188 | + <TextBlock Text="QT Interval" Style="{StaticResource staticTextStyle}"/> |
147 | 189 | </StackPanel> |
148 | 190 | </Grid> |
149 | 191 | </Border> |
150 | 192 |
|
151 | 193 | <!-- QRS Duration Panel --> |
152 | | - <Border BorderBrush="#e3e2df" BorderThickness="2" Background="#0a1f53" CornerRadius="10" Padding="20" Margin="0,0,0,10"> |
| 194 | + <Border Margin="0,0,0,10" Style="{StaticResource borderStyle}"> |
153 | 195 | <Grid> |
154 | 196 | <Grid.ColumnDefinitions> |
155 | 197 | <!-- Define columns for icon and text --> |
156 | 198 | <ColumnDefinition Width="5*"/> |
157 | 199 | <ColumnDefinition Width="5*"/> |
158 | 200 | </Grid.ColumnDefinitions> |
159 | | - <Path x:Name="QrsDuration" Stretch="Uniform" Fill="#FFFFFFFF" Width="60" Height="60" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left" VerticalAlignment="Top"/> |
160 | | - <TextBlock Text="now" FontSize="16" HorizontalAlignment="Left" VerticalAlignment="Bottom" Foreground="White"/> |
| 201 | + <Path x:Name="QrsDuration" Style="{StaticResource iconStyle}"/> |
| 202 | + <TextBlock Text="now" Style="{StaticResource timeIndicatorTextStyle}"/> |
161 | 203 | <StackPanel Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Vertical"> |
162 | | - <TextBlock Text="{Binding QRSDuration}" FontSize="28" FontWeight="Bold" Foreground="#2ac145" TextAlignment="Right"/> |
163 | | - <TextBlock Text="QRS Duration" FontSize="16" FontWeight="Bold" Foreground="#e3e2df" TextAlignment="Center"/> |
| 204 | + <TextBlock Text="{Binding QRSDuration}" Style="{StaticResource bindingTextStyle}"/> |
| 205 | + <TextBlock Text="QRS Duration" Style="{StaticResource staticTextStyle}"/> |
164 | 206 | </StackPanel> |
165 | 207 | </Grid> |
166 | 208 | </Border> |
167 | 209 | </UniformGrid> |
168 | 210 |
|
169 | 211 | <!-- ECG Chart Section --> |
170 | | - <Border Grid.Row="2" BorderBrush="#e3e2df" BorderThickness="2" Background="#0a1f53" CornerRadius="10" Padding="20" Margin="0,0,0,10"> |
| 212 | + <Border Grid.Row="2" Margin="0,0,0,10" Style="{StaticResource borderStyle}"> |
171 | 213 | <Grid> |
172 | 214 | <Grid.RowDefinitions> |
173 | 215 | <!-- Rows for title and chart --> |
|
0 commit comments