Skip to content

Commit

Permalink
fix: if current Page Size is -1 return -1
Browse files Browse the repository at this point in the history
  • Loading branch information
dansiegel committed Feb 24, 2024
1 parent ba16f1c commit 45adedd
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 45adedd

Please sign in to comment.