|
2 | 2 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
3 | 3 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
4 | 4 | xmlns:local="clr-namespace:MaterialDesignThemes.Wpf" |
5 | | - xmlns:converters="clr-namespace:MaterialDesignThemes.Wpf.Converters"> |
| 5 | + xmlns:converters="clr-namespace:MaterialDesignThemes.Wpf.Converters" |
| 6 | + xmlns:controlz="clr-namespace:Controlz"> |
6 | 7 |
|
7 | 8 | <ResourceDictionary.MergedDictionaries> |
8 | 9 | <!-- we only bring in the dictionaries for controls which were "invented" |
|
416 | 417 | <Setter Property="Template"> |
417 | 418 | <Setter.Value> |
418 | 419 | <ControlTemplate TargetType="local:DialogHost"> |
419 | | - <Grid Focusable="False"> |
| 420 | + <Grid x:Name="DialogHostRoot" Focusable="False"> |
420 | 421 | <VisualStateManager.VisualStateGroups> |
421 | 422 | <VisualStateGroup x:Name="PopupStates"> |
422 | 423 | <VisualStateGroup.Transitions> |
|
528 | 529 | </VisualState> |
529 | 530 | </VisualStateGroup> |
530 | 531 | </VisualStateManager.VisualStateGroups> |
531 | | - <Popup IsOpen="False" StaysOpen="True" AllowsTransparency="True" PopupAnimation="None" |
532 | | - x:Name="PART_Popup" |
533 | | - Placement="Center"> |
| 532 | + <controlz:PopupEx IsOpen="False" |
| 533 | + PlacementTarget="{Binding ElementName=DialogHostRoot, Mode=OneWay}" |
| 534 | + StaysOpen="True" |
| 535 | + AllowsTransparency="True" |
| 536 | + PopupAnimation="None" |
| 537 | + x:Name="PART_Popup" |
| 538 | + Placement="Center"> |
534 | 539 | <Popup.Resources> |
535 | 540 | <ResourceDictionary> |
536 | 541 | <ResourceDictionary.MergedDictionaries> |
537 | 542 | <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" /> |
538 | 543 | </ResourceDictionary.MergedDictionaries> |
539 | 544 | </ResourceDictionary> |
540 | 545 | </Popup.Resources> |
541 | | - <local:Card Margin="22" |
| 546 | + <local:Card Margin="22" |
542 | 547 | local:ShadowAssist.ShadowDepth="Depth5" |
543 | 548 | UniformCornerRadius="4" |
544 | 549 | TextElement.Foreground="{DynamicResource MaterialDesignBody}" |
545 | 550 | TextElement.FontWeight="Medium" |
546 | 551 | TextElement.FontSize="14" |
547 | | - TextOptions.TextFormattingMode="Ideal" |
548 | | - TextOptions.TextRenderingMode="Auto" |
| 552 | + TextOptions.TextFormattingMode="Ideal" |
| 553 | + TextOptions.TextRenderingMode="Auto" |
549 | 554 | Foreground="{DynamicResource MaterialDesignBody}" |
550 | 555 | FontFamily="pack://application:,,,/MaterialDesignThemes.Wpf;component/Resources/Roboto/#Roboto" |
551 | 556 | IsTabStop="False" |
|
555 | 560 | Content="{TemplateBinding DialogContent}" |
556 | 561 | ContentTemplate="{TemplateBinding DialogContentTemplate}" |
557 | 562 | ContentTemplateSelector="{TemplateBinding DialogContentTemplateSelector}" |
558 | | - ContentStringFormat="{TemplateBinding DialogContentStringFormat}"> |
| 563 | + ContentStringFormat="{TemplateBinding ContentStringFormat}"> |
559 | 564 | <local:Card.RenderTransform> |
560 | 565 | <TransformGroup> |
561 | | - <ScaleTransform x:Name="CardScaleTransform" ScaleX="0" ScaleY="0" /> |
| 566 | + <ScaleTransform x:Name="CardScaleTransform" |
| 567 | + ScaleX="0" |
| 568 | + ScaleY="0" /> |
562 | 569 | </TransformGroup> |
563 | 570 | </local:Card.RenderTransform> |
564 | 571 | </local:Card> |
565 | | - </Popup> |
| 572 | + </controlz:PopupEx> |
566 | 573 | <ContentPresenter |
567 | 574 | x:Name="ContentPresenter" Opacity="1" |
568 | 575 | Content="{TemplateBinding ContentControl.Content}" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}" /> |
|
0 commit comments