Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
Text="Enable all"
VerticalOptions="Center" />
</Grid>
<VerticalStackLayout HeightRequest="130" WidthRequest="250">
<VerticalStackLayout HeightRequest="130">
<Grid ColumnSpacing="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,91 +1,81 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
x:Class="ArcGIS.Samples.FilterBuildingSceneLayer.FilterBuildingSceneLayer"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:ArcGIS.Samples.FilterBuildingSceneLayer"
xmlns:esriUI="clr-namespace:Esri.ArcGISRuntime.Maui;assembly=Esri.ArcGISRuntime.Maui">
<Grid>
<Grid Style="{DynamicResource EsriSampleContainer}">
<!-- LocalSceneView displays the 3D building scene. -->
<esriUI:LocalSceneView x:Name="MySceneView" />
<esriUI:LocalSceneView x:Name="MySceneView" Style="{DynamicResource EsriSampleGeoView}" />

<!-- Settings panel for floor filtering and category visibility controls. -->
<Border
x:Name="SettingsPanel"
Margin="10"
Padding="16"
HeightRequest="300"
HorizontalOptions="End"
Style="{DynamicResource EsriSampleControlPanel}"
VerticalOptions="Start"
WidthRequest="250">
<ScrollView>
<VerticalStackLayout Spacing="12">
<!-- Floor selection dropdown. -->
<Grid ColumnDefinitions="Auto,*">
<!-- Control panel: toggles between settings and feature attributes. -->
<Border Style="{DynamicResource EsriSampleControlPanel}">
<Grid>
<!-- Settings panel for floor filtering and category visibility controls. -->
<ScrollView x:Name="SettingsPanel">
<VerticalStackLayout Spacing="12">
<!-- Floor selection dropdown. -->
<Grid ColumnDefinitions="Auto,*">
<Label
Grid.Column="0"
FontAttributes="Bold"
FontSize="14"
Text="Floor:"
VerticalOptions="Center" />
<Picker
x:Name="FloorPicker"
Grid.Column="1"
Margin="10,0,0,0"
SelectedIndexChanged="FloorPicker_SelectedIndexChanged" />
</Grid>

<!-- Category controls for toggling sublayer visibility. -->
<Label
Grid.Column="0"
FontAttributes="Bold"
FontSize="14"
Text="Floor:"
VerticalOptions="Center" />
<Picker
x:Name="FloorPicker"
Grid.Column="1"
Margin="10,0,0,0"
SelectedIndexChanged="FloorPicker_SelectedIndexChanged" />
</Grid>

<!-- Category controls for toggling sublayer visibility. -->
<Label
FontAttributes="Bold"
FontSize="14"
Text="Categories:" />
<VerticalStackLayout x:Name="CategoriesStackLayout" Spacing="4" />
Text="Categories:" />
<VerticalStackLayout x:Name="CategoriesStackLayout" Spacing="4" />

<!-- Instruction text. -->
<BoxView HeightRequest="1" Color="Gray" />
<Label
FontSize="12"
Text="Tap on a building feature to view its attributes."
TextColor="Gray" />
</VerticalStackLayout>
</ScrollView>
</Border>

<!-- Feature attributes panel, shown when a feature is selected. -->
<Border
x:Name="FeaturePanel"
Margin="10"
Padding="16"
HorizontalOptions="End"
IsVisible="False"
Style="{DynamicResource EsriSampleControlPanel}"
VerticalOptions="Start"
WidthRequest="250">
<!-- Instruction text. -->
<BoxView HeightRequest="1" Color="Gray" />
<Label
FontSize="12"
Text="Tap on a building feature to view its attributes."
TextColor="Gray" />
</VerticalStackLayout>
</ScrollView>

<Grid RowDefinitions="Auto,*" RowSpacing="8">
<!-- Header with close button. -->
<Grid Grid.Row="0">
<Label
FontAttributes="Bold"
FontSize="14"
HorizontalOptions="Start"
Text="Feature Attributes"
VerticalOptions="Center" />
<Button
BackgroundColor="Gray"
Clicked="CloseFeatureButton_Clicked"
FontSize="16"
HorizontalOptions="End"
Text="✖"
TextColor="{AppThemeBinding Light=Black,
Dark=White}" />
</Grid>
<!-- Feature attributes panel, shown when a feature is selected. -->
<Grid
x:Name="FeaturePanel"
IsVisible="False"
RowDefinitions="Auto,*"
RowSpacing="8">
<!-- Header with close button. -->
<Grid Grid.Row="0">
<Label
FontAttributes="Bold"
FontSize="14"
HorizontalOptions="Start"
Text="Feature Attributes"
VerticalOptions="Center" />
<Button
BackgroundColor="Gray"
Clicked="CloseFeatureButton_Clicked"
FontSize="16"
HorizontalOptions="End"
Text="✖"
TextColor="{AppThemeBinding Light=Black,
Dark=White}" />
</Grid>

<!-- Scrollable list of feature attributes. -->
<ScrollView Grid.Row="1" MaximumHeightRequest="200">
<CollectionView x:Name="FeatureAttributesCollection" ItemsLayout="VerticalList">
<!-- Scrollable list of feature attributes. -->
<CollectionView
x:Name="FeatureAttributesCollection"
Grid.Row="1"
ItemsLayout="VerticalList"
MaximumHeightRequest="400">
<CollectionView.ItemTemplate>
<DataTemplate x:DataType="local:BuildingSceneFeatureAttribute">
<VerticalStackLayout Margin="0,4" Spacing="2">
Expand All @@ -106,8 +96,8 @@
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</ScrollView>
</Grid>
</Grid>
</Border>
</Grid>
</ContentPage>
</ContentPage>
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<HorizontalStackLayout Spacing="5">
<Picker x:Name="PhasesList"
x:DataType="esri:CodedValue"
IsEnabled="False"
ItemDisplayBinding="{Binding Name}"
WidthRequest="150" />
<Button Clicked="OnAddPhase" Text="Add" />
Expand All @@ -30,25 +31,25 @@
HeightRequest="300"
VerticalScrollBarVisibility="Default">
<CollectionView.Header>
<Grid ColumnDefinitions="Auto, Auto, Auto"
ColumnSpacing="25"
HorizontalOptions="Center">
<Grid ColumnDefinitions="*, *, *"
Padding="5,0">
<Label Grid.Column="0"
FontAttributes="Bold"
Text="Phase" />
<Label Grid.Column="1"
FontAttributes="Bold"
HorizontalOptions="Center"
Text="Total Customers" />
<Label Grid.Column="2"
FontAttributes="Bold"
HorizontalOptions="Center"
Text="Total Load" />
</Grid>
</CollectionView.Header>
<CollectionView.ItemTemplate>
<DataTemplate x:DataType="local:PhaseSummary">
<Grid Margin="5"
ColumnDefinitions="100, 50, 175"
HorizontalOptions="Center">
<Grid ColumnDefinitions="*, *, *"
Padding="5,0">
<Label Text="{Binding Phase}" />
<Label Grid.Column="1"
HorizontalOptions="Center"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ private async Task Initialize()
if (_phasesNetworkAttribute.Domain is CodedValueDomain codedValueDomain)
{
PhasesList.ItemsSource = codedValueDomain.CodedValues.ToList();
PhasesList.IsEnabled = true;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
Light=White}"
HorizontalOptions="Center"
IsVisible="False"
HeightRequest="250"
MaximumHeightRequest="250"
StrokeShape="RoundRectangle 10"
VerticalOptions="Center"
WidthRequest="300">
Expand Down
Loading