|
8 | 8 | <ControlTemplate.Resources> |
9 | 9 | <DataTemplate DataType="{x:Type ValidationError}"> |
10 | 10 | <TextBlock Foreground="{DynamicResource ValidationErrorBrush}" |
11 | | - FontSize="10" |
12 | | - MaxWidth="{Binding ElementName=Placeholder, Path=ActualWidth}" |
13 | | - HorizontalAlignment="Left" |
14 | | - Margin="2" |
15 | | - TextWrapping="Wrap" |
16 | | - Text="{Binding ErrorContent}" |
17 | | - UseLayoutRounding="false" /> |
| 11 | + FontSize="10" |
| 12 | + MaxWidth="{Binding ElementName=Placeholder, Path=ActualWidth}" |
| 13 | + HorizontalAlignment="Left" |
| 14 | + Margin="2" |
| 15 | + TextWrapping="Wrap" |
| 16 | + Text="{Binding ErrorContent}" |
| 17 | + UseLayoutRounding="false" /> |
18 | 18 | </DataTemplate> |
19 | 19 | </ControlTemplate.Resources> |
20 | 20 | <StackPanel> |
21 | 21 | <AdornedElementPlaceholder Name="Placeholder" /> |
22 | 22 | <Border Name="DefaultErrorViewer" |
23 | 23 | Visibility="Collapsed" |
24 | 24 | Background="{DynamicResource MaterialDesignPaper}"> |
25 | | - <ContentPresenter Content="{Binding CurrentItem}" /> |
| 25 | + <TextBlock Foreground="{DynamicResource ValidationErrorBrush}" |
| 26 | + FontSize="10" |
| 27 | + MaxWidth="{Binding ElementName=Placeholder, Path=ActualWidth}" |
| 28 | + HorizontalAlignment="Left" |
| 29 | + Margin="0 2" |
| 30 | + TextWrapping="Wrap" |
| 31 | + Text="{Binding CurrentItem.ErrorContent}" |
| 32 | + UseLayoutRounding="false" /> |
26 | 33 | </Border> |
27 | | - |
28 | 34 | <controlzEx:PopupEx x:Name="ValidationPopup" |
29 | | - IsOpen="False" |
30 | | - Placement="Bottom" |
31 | | - PlacementTarget="{Binding ElementName=Placeholder, Mode=OneWay}" |
32 | | - AllowsTransparency="True"> |
| 35 | + IsOpen="False" |
| 36 | + Placement="Bottom" |
| 37 | + PlacementTarget="{Binding ElementName=Placeholder, Mode=OneWay}" |
| 38 | + AllowsTransparency="True"> |
33 | 39 | <Border Background="{DynamicResource MaterialDesignPaper}"> |
34 | | - <ContentPresenter Content="{Binding CurrentItem}" /> |
| 40 | + <TextBlock Foreground="{DynamicResource ValidationErrorBrush}" |
| 41 | + FontSize="10" |
| 42 | + HorizontalAlignment="Left" |
| 43 | + Margin="0 2" |
| 44 | + TextWrapping="Wrap" |
| 45 | + Text="{Binding CurrentItem.ErrorContent}" |
| 46 | + UseLayoutRounding="false" /> |
35 | 47 | </Border> |
36 | 48 | </controlzEx:PopupEx> |
37 | 49 | </StackPanel> |
|
0 commit comments