55 <converters : BooleansOrConverter x : Key =" BooleansOrConverter" />
66
77 <ControlTemplate x : Key =" DefaultErrorTemplate" >
8- <StackPanel Orientation =" Horizontal" >
9- <Grid >
10- <Polygon x : Name =" toolTipCorner" Grid.ZIndex=" 2" Margin =" 0" Points =" 8,8 8,0 0,0"
11- Fill =" {DynamicResource MahApps.Brushes.Accent}" HorizontalAlignment =" Right"
8+ <!--
9+ <Grid>
10+ <Border BorderBrush="#b95353" BorderThickness="1">
11+ -->
12+ <Grid >
13+ <Polygon x : Name =" ToolTipCorner" Grid.ZIndex=" 1" Margin =" 0" Points =" 12,12 12,0 0,0"
14+ Fill =" #b95353" HorizontalAlignment =" Right"
1215 VerticalAlignment =" Top" IsHitTestVisible =" True" />
13- <AdornedElementPlaceholder x : Name =" adorner" />
14- <Popup PlacementTarget =" {Binding ElementName=adorner}" PopupAnimation =" Fade" HorizontalOffset =" 5" >
15- <Popup .Style>
16- <Style TargetType =" {x:Type Popup}" >
17- <Style .Triggers>
18- <DataTrigger
19- Binding =" {Binding ElementName=adorner, Path=AdornedElement.IsKeyboardFocusWithin}"
16+
17+ <AdornedElementPlaceholder x : Name =" Adorner" />
18+ <Popup PlacementTarget =" {Binding ElementName=Adorner}" PopupAnimation =" Fade" HorizontalOffset =" 5" >
19+ <Popup .Style>
20+ <Style TargetType =" {x:Type Popup}" >
21+ <Style .Triggers>
22+ <DataTrigger
23+ Binding =" {Binding ElementName=Adorner, Path=AdornedElement.IsKeyboardFocusWithin}"
2024 Value =" True" >
21- <Setter Property =" PlacementTarget" Value =" {Binding ElementName=adorner }" />
22- <Setter Property =" Placement" Value =" Right" />
23- </DataTrigger >
24- <DataTrigger Binding =" {Binding ElementName=toolTipCorner , Path=IsMouseOver}"
25+ <Setter Property =" PlacementTarget" Value =" {Binding ElementName=Adorner }" />
26+ <Setter Property =" Placement" Value =" Right" />
27+ </DataTrigger >
28+ <DataTrigger Binding =" {Binding ElementName=ToolTipCorner , Path=IsMouseOver}"
2529 Value =" True" >
26- <Setter Property =" PlacementTarget" Value =" {Binding ElementName=toolTipCorner }" />
27- <Setter Property =" Placement" Value =" Mouse" />
28- </DataTrigger >
29- <DataTrigger Value =" True" >
30- <DataTrigger .Binding>
31- <MultiBinding Converter =" {StaticResource BooleansOrConverter}" >
32- <Binding ElementName =" adorner " Path =" AdornedElement.IsKeyboardFocusWithin" />
33- <Binding ElementName =" toolTipCorner " Path =" IsMouseOver" />
34- </MultiBinding >
35- </DataTrigger .Binding>
36- <Setter Property =" IsOpen" Value =" True" />
37- </DataTrigger >
38- </Style .Triggers>
39- </Style >
40- </Popup .Style>
41- <StackPanel >
42- <Border MaxWidth =" 300" Background =" {DynamicResource MahApps.Brushes.Window.Background}"
30+ <Setter Property =" PlacementTarget" Value =" {Binding ElementName=ToolTipCorner }" />
31+ <Setter Property =" Placement" Value =" Mouse" />
32+ </DataTrigger >
33+ <DataTrigger Value =" True" >
34+ <DataTrigger .Binding>
35+ <MultiBinding Converter =" {StaticResource BooleansOrConverter}" >
36+ <Binding ElementName =" Adorner " Path =" AdornedElement.IsKeyboardFocusWithin" />
37+ <Binding ElementName =" ToolTipCorner " Path =" IsMouseOver" />
38+ </MultiBinding >
39+ </DataTrigger .Binding>
40+ <Setter Property =" IsOpen" Value =" True" />
41+ </DataTrigger >
42+ </Style .Triggers>
43+ </Style >
44+ </Popup .Style>
45+ <StackPanel >
46+ <Border MaxWidth =" 300" Background =" {DynamicResource MahApps.Brushes.Window.Background}"
4347 BorderBrush =" {DynamicResource MahApps.Brushes.Gray8}" BorderThickness =" 1" Padding =" 5" >
44- <Grid >
45- <Grid .ColumnDefinitions>
46- <ColumnDefinition Width =" Auto" />
47- <ColumnDefinition Width =" *" />
48- </Grid .ColumnDefinitions>
49- <Rectangle Grid.Column=" 0" Width =" 20" Height =" 20"
48+ <Grid >
49+ <Grid .ColumnDefinitions>
50+ <ColumnDefinition Width =" Auto" />
51+ <ColumnDefinition Width =" *" />
52+ </Grid .ColumnDefinitions>
53+ <Rectangle Grid.Column=" 0" Width =" 20" Height =" 20"
5054 Fill =" {DynamicResource MahApps.Brushes.Gray3}" >
51- <Rectangle .OpacityMask>
52- <VisualBrush Stretch =" Uniform"
55+ <Rectangle .OpacityMask>
56+ <VisualBrush Stretch =" Uniform"
5357 Visual =" {iconPacks:Material Kind=InformationVariant}" />
54- </Rectangle .OpacityMask>
55- </Rectangle >
56- <TextBlock Grid.Column=" 1" Text =" {Binding Path=/ErrorContent}"
58+ </Rectangle .OpacityMask>
59+ </Rectangle >
60+ <TextBlock Grid.Column=" 1" Text =" {Binding Path=/ErrorContent}"
5761 Foreground =" {DynamicResource MahApps.Brushes.Text}" FontSize =" 14"
5862 TextWrapping =" Wrap" VerticalAlignment =" Center" Margin =" 10,0,0,0" />
59- </Grid >
60- </Border >
61- </StackPanel >
62- </Popup >
63- </Grid >
64- </StackPanel >
63+ </Grid >
64+ </Border >
65+ </StackPanel >
66+ </Popup >
67+ </Grid >
68+ <!--
69+ </Border>
70+ </Grid>
71+ -->
72+ </ControlTemplate >
73+
74+ <ControlTemplate x : Key =" ErrorTemplateOffset" >
75+
6576 </ControlTemplate >
6677</ResourceDictionary >
0 commit comments