Jelajahi Sumber

淇鎶ヨ璇︽儏绌哄肩粦瀹 - 娣诲姞FallbackValue鍏滃簳

纾 鏇 1 Minggu lalu
induk
melakukan
5ad1f5f7fa
1 mengubah file dengan 4 tambahan dan 4 penghapusan
  1. 4 4
      src/YZWater.Avalonia/Views/ViewDView.axaml

+ 4 - 4
src/YZWater.Avalonia/Views/ViewDView.axaml

@@ -72,19 +72,19 @@
                         IsVisible="{Binding SelectedRecord, Converter={x:Static ObjectConverters.IsNotNull}}">
                     <Grid ColumnDefinitions="80,*" RowDefinitions="Auto,Auto,Auto,Auto">
                         <TextBlock Grid.Row="0" Grid.Column="0" Text="TIME" FontFamily="{DynamicResource MonoFont}" FontSize="10" Foreground="{DynamicResource TextTertiaryBrush}"/>
-                        <TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding SelectedRecord.AlarmTime, StringFormat='{}{0:yyyy-MM-dd HH:mm:ss}'}"
+                        <TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding SelectedRecord.AlarmTime, StringFormat='{}{0:yyyy-MM-dd HH:mm:ss}', FallbackValue='--'}"
                                    FontFamily="{DynamicResource MonoFont}" FontSize="11" Foreground="{DynamicResource TextPrimaryBrush}"/>
 
                         <TextBlock Grid.Row="1" Grid.Column="0" Text="TYPE" FontFamily="{DynamicResource MonoFont}" FontSize="10" Foreground="{DynamicResource TextTertiaryBrush}"/>
-                        <TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding SelectedRecord.AlarmType}"
+                        <TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding SelectedRecord.AlarmType, FallbackValue='--'}"
                                    FontFamily="{DynamicResource MonoFont}" FontSize="11" Foreground="{DynamicResource WarningBrush}"/>
 
                         <TextBlock Grid.Row="2" Grid.Column="0" Text="MESSAGE" FontFamily="{DynamicResource MonoFont}" FontSize="10" Foreground="{DynamicResource TextTertiaryBrush}"/>
-                        <TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding SelectedRecord.AlarmMessage}"
+                        <TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding SelectedRecord.AlarmMessage, FallbackValue='--'}"
                                    FontFamily="{DynamicResource MonoFont}" FontSize="11" Foreground="{DynamicResource DangerBrush}"/>
 
                         <TextBlock Grid.Row="3" Grid.Column="0" Text="LEVEL" FontFamily="{DynamicResource MonoFont}" FontSize="10" Foreground="{DynamicResource TextTertiaryBrush}"/>
-                        <TextBlock Grid.Row="3" Grid.Column="1" Text="{Binding SelectedRecord.AlarmLevel, StringFormat='{}Level {0}'}"
+                        <TextBlock Grid.Row="3" Grid.Column="1" Text="{Binding SelectedRecord.AlarmLevel, StringFormat='{}Level {0}', FallbackValue='--'}"
                                    FontFamily="{DynamicResource MonoFont}" FontSize="11" Foreground="{DynamicResource TextPrimaryBrush}"/>
                     </Grid>
                 </Border>