Skip to content

Commit

Permalink
Merge pull request #3082 from PrismLibrary/dev/ds/maui-dialogs
Browse files Browse the repository at this point in the history
Fixes Relative Dialog Size
  • Loading branch information
dansiegel authored Feb 24, 2024
2 parents ba16f1c + 45adedd commit 285e389
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions e2e/Maui/MauiModule/Dialogs/LoginDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
<Grid xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:vm="clr-namespace:MauiModule.ViewModels"
xmlns:prism="http://prismlibrary.com"
prism:DialogLayout.RelativeHeightRequest="0.5"
prism:DialogLayout.RelativeWidthRequest="0.8"
x:DataType="vm:LoginViewModel"
BackgroundColor="White"
RowDefinitions="Auto,*"
Expand Down
3 changes: 3 additions & 0 deletions src/Maui/Prism.Maui/Dialogs/RelativeContentSizeConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public double RelativeSize
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
var pageSize = double.Parse(value.ToString());
if (pageSize < 0)
return pageSize;

return RelativeSize * pageSize;
}

Expand Down

0 comments on commit 285e389

Please sign in to comment.