|
25 | 25 | <ControlTemplate TargetType="ToggleButton">
|
26 | 26 | <wpf:Ripple Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Focusable="False"
|
27 | 27 | ClipToBounds="False"
|
| 28 | + wpf:RippleAssist.IsCentered="True" |
28 | 29 | Feedback="{DynamicResource MaterialDesignFlatButtonRipple}"
|
29 | 30 | HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
30 | 31 | VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
50 | 51 | PopupAnimation="Fade"
|
51 | 52 | AllowsTransparency="True">
|
52 | 53 | <wpf:Card Content="{TemplateBinding PopupContent}" ContentTemplate="{TemplateBinding PopupContentTemplate}"
|
53 |
| - Margin="5" /> |
| 54 | + Margin="5" /> |
54 | 55 | </controlz:PopupEx>
|
55 | 56 | </Grid>
|
56 | 57 | </ControlTemplate>
|
|
129 | 130 | <wpf:Ripple Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Focusable="False"
|
130 | 131 | Feedback="White"
|
131 | 132 | Clip="{Binding ElementName=GeometryEllipse, Path=RenderedGeometry}" ClipToBounds="True"
|
| 133 | + wpf:RippleAssist.IsCentered="True" |
132 | 134 | HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
133 | 135 | VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
134 | 136 | Padding="{TemplateBinding Padding}"
|
|
171 | 173 | Placement="Custom"
|
172 | 174 | PopupAnimation="Fade"
|
173 | 175 | AllowsTransparency="True">
|
174 |
| - <wpf:Card Content="{TemplateBinding PopupContent}" ContentTemplate="{TemplateBinding PopupContentTemplate}" |
175 |
| - Margin="5" Padding="8" /> |
| 176 | + <wpf:Card Content="{TemplateBinding PopupContent}" ContentTemplate="{TemplateBinding PopupContentTemplate}" |
| 177 | + Margin="5" Padding="8"> |
| 178 | + <wpf:Card.Resources> |
| 179 | + <ResourceDictionary> |
| 180 | + <Style TargetType="{x:Type Button}"> |
| 181 | + <Style.Setters> |
| 182 | + <Setter Property="Background" Value="{DynamicResource MaterialDesignPrimaryLightBrush}" /> |
| 183 | + <Setter Property="Foreground" Value="{DynamicResource MaterialDesignPrimaryLightForegroundBrush}" /> |
| 184 | + <Setter Property="ToolTipService.IsEnabled" Value="False" /> |
| 185 | + <Setter Property="Template"> |
| 186 | + <Setter.Value> |
| 187 | + <ControlTemplate TargetType="{x:Type Button}"> |
| 188 | + <StackPanel Orientation="Horizontal" Margin="8"> |
| 189 | + <Grid Clip="{Binding ElementName=UncheckedEllipse, Path=RenderedGeometry}" ClipToBounds="True" Background="{TemplateBinding Background}" |
| 190 | + Width="30" Height="30"> |
| 191 | + <Ellipse Fill="{TemplateBinding Background}" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" x:Name="UncheckedEllipse" /> |
| 192 | + <ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="1" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" /> |
| 193 | + </Grid> |
| 194 | + <Border Background="{DynamicResource MaterialDesignToolTipBackground}" Margin="8 0 0 0" Padding="8"> |
| 195 | + <ContentControl Foreground="{DynamicResource MaterialDesignPaper}" Content="{TemplateBinding ToolTip}" VerticalAlignment="Center" /> |
| 196 | + </Border> |
| 197 | + </StackPanel> |
| 198 | + </ControlTemplate> |
| 199 | + </Setter.Value> |
| 200 | + </Setter> |
| 201 | + </Style.Setters> |
| 202 | + </Style> |
| 203 | + </ResourceDictionary> |
| 204 | + </wpf:Card.Resources> |
| 205 | + <wpf:Card.Background> |
| 206 | + <SolidColorBrush Color="White" Opacity=".6" /> |
| 207 | + </wpf:Card.Background> |
| 208 | + </wpf:Card> |
176 | 209 | </controlz:PopupEx>
|
177 | 210 | </Grid>
|
178 | 211 | </ControlTemplate>
|
|
0 commit comments