unify screendialog and dialogs to single control.
MODIFY
WalletWasabi.Fluent/Controls/Dialog.xaml
WalletWasabi.Fluent/Controls/Dialog.xaml
<ControlTemplate>
<Panel>
<Panel Background="{DynamicResource DialogOverlayColor}" Name="PART_Overlay" />
- <Panel Name="PART_DialogHost" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="40">
+ <Panel Name="PART_DialogHost" VerticalAlignment="{TemplateBinding VerticalAlignment}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" Margin="40">
<Border CornerRadius="4" BoxShadow="{DynamicResource DialogBoxShadow}" Background="{DynamicResource DialogBackground}">
- <DockPanel Margin="20 0">
- <Button DockPanel.Dock="Left" Margin="0 35 0 0" Classes="invisible" Command="{Binding Close}" HorizontalAlignment="Left" VerticalAlignment="Top">
- <PathIcon Data="{StaticResource arrow_left_regular}" />
- </Button>
<ContentPresenter Name="PART_ContentPresenter" Margin="20 36 20 0"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
Padding="{TemplateBinding Padding}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"/>
- </DockPanel>
</Border>
</Panel>
</Panel>

MODIFY
WalletWasabi.Fluent/Views/MainView.axaml
WalletWasabi.Fluent/Views/MainView.axaml
<rxui:RoutedViewHost.PageTransition>
<CrossFade Duration="0:0:0.25" />
</rxui:RoutedViewHost.PageTransition>
- <rxui:RoutedViewHost.DefaultContent>
- <TextBlock Text="Default content"
- HorizontalAlignment="Center"
- VerticalAlignment="Center" />
- </rxui:RoutedViewHost.DefaultContent>
</rxui:RoutedViewHost>
</Panel>
</DockPanel>
</Panel>
</SplitView>
- <Panel DataContext="{Binding DialogScreen}" IsVisible="{Binding IsDialogVisible}">
- <Panel Background="{DynamicResource DialogOverlayColor}">
- <i:Interaction.Behaviors>
- <ia:EventTriggerBehavior EventName="PointerPressed">
- <ia:CallMethodAction TargetObject="{Binding}" MethodName="Close" />
- </ia:EventTriggerBehavior>
- </i:Interaction.Behaviors>
- </Panel>
- <Border Padding="0,20,0,20" CornerRadius="4"
- Background="{DynamicResource DialogBackground}"
- MaxWidth="800" MaxHeight="700"
- Margin="40">
- <rxui:RoutedViewHost Router="{Binding Router}">
+ <c:Dialog DataContext="{Binding DialogScreen}" IsDialogOpen="{Binding IsDialogVisible, Mode=TwoWay}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
+ <rxui:RoutedViewHost Router="{Binding Router}" MaxWidth="800" MaxHeight="700" Margin="40">
<rxui:RoutedViewHost.ViewLocator>
<vl:ScreenViewLocator />
</rxui:RoutedViewHost.ViewLocator>
<rxui:RoutedViewHost.PageTransition>
<CrossFade Duration="0:0:0.25" />
</rxui:RoutedViewHost.PageTransition>
- <rxui:RoutedViewHost.DefaultContent>
- <TextBlock Text="Default content"
- HorizontalAlignment="Center"
- VerticalAlignment="Center" />
- </rxui:RoutedViewHost.DefaultContent>
</rxui:RoutedViewHost>
- </Border>
- </Panel>
- <c:Dialog DataContext="{Binding CurrentDialog}"
+ </c:Dialog>
+ <c:Dialog HorizontalAlignment="Center" VerticalAlignment="Center"
+ DataContext="{Binding CurrentDialog}"
Content="{Binding }"
IsDialogOpen="{Binding IsDialogOpen, Mode=TwoWay}" />
</Panel>

unify screendialog and dialogs to single control.