|
142 | 142 | x:Name="PART_Popup"
|
143 | 143 | Style="{TemplateBinding PopupStyle}"
|
144 | 144 | wpf:ThemeAssist.Theme="{TemplateBinding DialogTheme}">
|
145 |
| - <wpf:Card x:Name="PART_PopupContentElement" |
146 |
| - Margin="{TemplateBinding DialogMargin}" |
147 |
| - wpf:ShadowAssist.ShadowDepth="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(wpf:ShadowAssist.ShadowDepth)}" |
148 |
| - UniformCornerRadius="4" |
149 |
| - TextElement.Foreground="{DynamicResource MaterialDesignBody}" |
150 |
| - TextElement.FontWeight="Regular" |
151 |
| - TextElement.FontSize="13" |
152 |
| - TextOptions.TextFormattingMode="Ideal" |
153 |
| - TextOptions.TextRenderingMode="Auto" |
154 |
| - FocusManager.IsFocusScope="False" |
155 |
| - Foreground="{DynamicResource MaterialDesignBody}" |
156 |
| - Focusable="True" |
157 |
| - IsTabStop="False" |
158 |
| - Opacity="0" |
159 |
| - RenderTransformOrigin=".5,.5" |
160 |
| - Content="{TemplateBinding DialogContent}" |
161 |
| - ContentTemplate="{TemplateBinding DialogContentTemplate}" |
162 |
| - ContentTemplateSelector="{TemplateBinding DialogContentTemplateSelector}" |
163 |
| - ContentStringFormat="{TemplateBinding DialogContentStringFormat}"> |
164 |
| - <wpf:Card.RenderTransform> |
165 |
| - <TransformGroup> |
166 |
| - <ScaleTransform x:Name="CardScaleTransform" |
| 145 | + <Grid> |
| 146 | + <Border Background="Transparent" IsHitTestVisible="{TemplateBinding CloseOnClickAway}"> |
| 147 | + <Border.InputBindings> |
| 148 | + <MouseBinding MouseAction="LeftClick" |
| 149 | + Command="{x:Static wpf:DialogHost.CloseDialogCommand}" |
| 150 | + CommandParameter="{TemplateBinding CloseOnClickAwayParameter}" |
| 151 | + /> |
| 152 | + </Border.InputBindings> |
| 153 | + </Border> |
| 154 | + <wpf:Card x:Name="PART_PopupContentElement" |
| 155 | + Margin="{TemplateBinding DialogMargin}" |
| 156 | + wpf:ShadowAssist.ShadowDepth="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(wpf:ShadowAssist.ShadowDepth)}" |
| 157 | + UniformCornerRadius="4" |
| 158 | + TextElement.Foreground="{DynamicResource MaterialDesignBody}" |
| 159 | + TextElement.FontWeight="Regular" |
| 160 | + TextElement.FontSize="13" |
| 161 | + TextOptions.TextFormattingMode="Ideal" |
| 162 | + TextOptions.TextRenderingMode="Auto" |
| 163 | + FocusManager.IsFocusScope="False" |
| 164 | + Foreground="{DynamicResource MaterialDesignBody}" |
| 165 | + Focusable="True" |
| 166 | + IsTabStop="False" |
| 167 | + IsHitTestVisible="True" |
| 168 | + Opacity="0" |
| 169 | + RenderTransformOrigin=".5,.5" |
| 170 | + Content="{TemplateBinding DialogContent}" |
| 171 | + ContentTemplate="{TemplateBinding DialogContentTemplate}" |
| 172 | + ContentTemplateSelector="{TemplateBinding DialogContentTemplateSelector}" |
| 173 | + ContentStringFormat="{TemplateBinding DialogContentStringFormat}"> |
| 174 | + <wpf:Card.RenderTransform> |
| 175 | + <TransformGroup> |
| 176 | + <ScaleTransform x:Name="CardScaleTransform" |
167 | 177 | ScaleX="0"
|
168 | 178 | ScaleY="0" />
|
169 |
| - </TransformGroup> |
170 |
| - </wpf:Card.RenderTransform> |
171 |
| - </wpf:Card> |
| 179 | + </TransformGroup> |
| 180 | + </wpf:Card.RenderTransform> |
| 181 | + </wpf:Card> |
| 182 | + </Grid> |
172 | 183 | </wpf:PopupEx>
|
173 | 184 | <AdornerDecorator>
|
174 | 185 | <ContentPresenter x:Name="ContentPresenter" Opacity="1" Content="{TemplateBinding ContentControl.Content}"
|
|
0 commit comments