Skip to content

Commit

Permalink
Simplify demo
Browse files Browse the repository at this point in the history
  • Loading branch information
pomianowski committed Jun 2, 2024
1 parent 1699665 commit b13221e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
13 changes: 1 addition & 12 deletions samples/Wpf.Ui.Demo.Dialogs/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,4 @@
x:Class="Wpf.Ui.Demo.Dialogs.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Wpf.Ui.Demo.Dialogs"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ui:ThemesDictionary Theme="Light" />
<ui:ControlsDictionary />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
StartupUri="MainWindow.xaml" />
9 changes: 8 additions & 1 deletion samples/Wpf.Ui.Demo.Dialogs/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,20 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Wpf.Ui.Demo.Dialogs"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
Title="WPF UI - Dialog sample"
Width="800"
Height="450"
mc:Ignorable="d">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ui:ThemesDictionary Theme="Light" />
<ui:ControlsDictionary />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>

<Grid>
<ui:Button
Expand Down
1 change: 1 addition & 0 deletions src/Wpf.Ui/Controls/ContentDialog/ContentDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,7 @@ protected virtual void OnLoaded()

private Size GetNewDialogSize(Size desiredSize)
{
// TODO: Handle negative values
var paddingWidth = Padding.Left + Padding.Right;
var paddingHeight = Padding.Top + Padding.Bottom;

Expand Down

0 comments on commit b13221e

Please sign in to comment.