Skip to content

Commit

Permalink
Fix auto-sizing of floor filter
Browse files Browse the repository at this point in the history
  • Loading branch information
dotMorten committed Aug 8, 2023
1 parent 89c3fc0 commit 44ca109
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
Margin="8,8,8,32"
GeoView="{x:Reference MyMapView}"
HorizontalOptions="Start"
MaximumHeightRequest="400"
VerticalOptions="End" />
</Grid>
</ContentPage.Content>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static FloorFilter()
$@"<ControlTemplate xmlns=""http://schemas.microsoft.com/dotnet/2021/maui"" xmlns:x=""http://schemas.microsoft.com/winfx/2009/xaml""
xmlns:esriTK=""clr-namespace:Esri.ArcGISRuntime.Toolkit.Maui""
x:DataType=""controls:FloorFilter"" x:Name=""Self"">
<Grid RowSpacing=""0"" x:Name=""PART_VisibilityWrapper"" IsVisible=""True"">
<Grid RowSpacing=""0"" x:Name=""PART_VisibilityWrapper"" IsVisible=""True"" VerticalOptions=""EndAndExpand"">
<Grid.Resources>
<Style TargetType=""Button"">
<Setter Property=""Background"" Value=""{{AppThemeBinding Light=#fff,Dark=#353535}}"" />
Expand All @@ -148,11 +148,11 @@ static FloorFilter()
<Grid.RowDefinitions>
<RowDefinition Height=""Auto"" />
<RowDefinition Height=""Auto"" />
<RowDefinition Height=""Auto"" />
<RowDefinition Height=""*"" />
<RowDefinition Height=""Auto"" />
<RowDefinition Height=""Auto"" />
</Grid.RowDefinitions>
<Frame HasShadow=""False"" BackgroundColor=""{{AppThemeBinding Light=#dfdfdf, Dark=#404040}}"" Grid.RowSpan=""5"" HorizontalOptions=""FillAndExpand"" VerticalOptions=""FillAndExpand"" />
<Border BackgroundColor=""{{AppThemeBinding Light=#dfdfdf, Dark=#404040}}"" Grid.RowSpan=""5"" HorizontalOptions=""FillAndExpand"" VerticalOptions=""FillAndExpand"" />
<Button x:Name=""{nameof(PART_BrowseButton)}"" Margin=""0"" Padding=""16"" Text=""{IconFont.UrbanModel}"" />
<Button x:Name=""{nameof(PART_AllButton)}"" Text=""{IconFont.Viewshed}"" Margin=""0,-1,0,0""
Grid.Row=""1"" />
Expand Down
3 changes: 0 additions & 3 deletions src/Toolkit/Toolkit.Maui/FloorFilter/FloorFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -593,9 +593,6 @@ private void UpdateLevelListSize()

const int maxHeight = 320;
var desiredHeight = (_displayLevels?.Count ?? 0) * 48;
var limitedHeight = Math.Min(maxHeight, desiredHeight);
PART_LevelListView.HeightRequest = limitedHeight;
PART_LevelListContainer?.SetValue(MaximumHeightRequestProperty, limitedHeight + 2);

if (desiredHeight > maxHeight)
{
Expand Down

0 comments on commit 44ca109

Please sign in to comment.