initial commit
This commit is contained in:
@@ -0,0 +1,110 @@
|
||||
<Window xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:pg="using:Avalonia.PropertyGrid.Controls"
|
||||
xmlns:models="using:AdvancedExample.Models"
|
||||
x:Class="AdvancedExample.MainWindow"
|
||||
x:DataType="models:AdvancedConfiguration"
|
||||
Title="Advanced PropertyGrid Example - Complex Configuration"
|
||||
Width="1100"
|
||||
Height="750"
|
||||
>
|
||||
<Grid RowDefinitions="Auto,*,Auto" Margin="20">
|
||||
|
||||
<!-- Header Section -->
|
||||
<Border Grid.Row="0"
|
||||
Padding="20"
|
||||
Background="{DynamicResource SystemAccentColor}"
|
||||
CornerRadius="8"
|
||||
Margin="0,0,0,20">
|
||||
<StackPanel Spacing="8">
|
||||
<TextBlock Text="🔧 Advanced PropertyGrid Configuration Editor"
|
||||
FontSize="26"
|
||||
FontWeight="Bold"
|
||||
Foreground="White"/>
|
||||
<TextBlock Text="Comprehensive example featuring nested objects, validation, categories, and real-time property changes"
|
||||
FontSize="14"
|
||||
Foreground="White"
|
||||
Opacity="0.9"/>
|
||||
<StackPanel Orientation="Horizontal" Spacing="15" Margin="0,8,0,0">
|
||||
<StackPanel Orientation="Horizontal" Spacing="5">
|
||||
<TextBlock Text="📊" FontSize="16" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="Categories: 8" FontSize="13" Foreground="White" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Spacing="5">
|
||||
<TextBlock Text="🏷️" FontSize="16" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="Properties: 27+" FontSize="13" Foreground="White" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Spacing="5">
|
||||
<TextBlock Text="🔗" FontSize="16" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="Nested Objects: 2" FontSize="13" Foreground="White" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Spacing="5">
|
||||
<TextBlock Text="✅" FontSize="16" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="Validation Enabled" FontSize="13" Foreground="White" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Main PropertyGrid -->
|
||||
<Border Grid.Row="1"
|
||||
BorderBrush="{DynamicResource SystemControlForegroundBaseMediumBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="8"
|
||||
Background="{DynamicResource SystemControlBackgroundAltHighBrush}">
|
||||
<pg:PropertyGrid SelectedObject="{Binding}"
|
||||
ShowCategories="True"
|
||||
ShowDescriptions="True"
|
||||
Margin="10"/>
|
||||
</Border>
|
||||
|
||||
<!-- Footer with Feature List -->
|
||||
<Border Grid.Row="2"
|
||||
Padding="15"
|
||||
Background="{DynamicResource SystemControlBackgroundAltHighBrush}"
|
||||
CornerRadius="8"
|
||||
Margin="0,20,0,0">
|
||||
<StackPanel Spacing="10">
|
||||
<TextBlock Text="✨ Advanced Features Demonstrated:"
|
||||
FontSize="14"
|
||||
FontWeight="SemiBold"/>
|
||||
<Grid ColumnDefinitions="*,*" RowDefinitions="Auto,Auto,Auto,Auto">
|
||||
<StackPanel Grid.Column="0" Grid.Row="0" Orientation="Horizontal" Spacing="8">
|
||||
<TextBlock Text="✓" Foreground="Green" FontWeight="Bold"/>
|
||||
<TextBlock Text="Nested object properties (DatabaseSettings, NetworkSettings)"/>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Grid.Row="0" Orientation="Horizontal" Spacing="8">
|
||||
<TextBlock Text="✓" Foreground="Green" FontWeight="Bold"/>
|
||||
<TextBlock Text="Data validation with attributes (Required, Range, StringLength)"/>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="0" Grid.Row="1" Orientation="Horizontal" Spacing="8" Margin="0,5,0,0">
|
||||
<TextBlock Text="✓" Foreground="Green" FontWeight="Bold"/>
|
||||
<TextBlock Text="INotifyPropertyChanged for real-time updates"/>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Grid.Row="1" Orientation="Horizontal" Spacing="8" Margin="0,5,0,0">
|
||||
<TextBlock Text="✓" Foreground="Green" FontWeight="Bold"/>
|
||||
<TextBlock Text="Read-only computed properties"/>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="0" Grid.Row="2" Orientation="Horizontal" Spacing="8" Margin="0,5,0,0">
|
||||
<TextBlock Text="✓" Foreground="Green" FontWeight="Bold"/>
|
||||
<TextBlock Text="Multiple categories and descriptions"/>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Grid.Row="2" Orientation="Horizontal" Spacing="8" Margin="0,5,0,0">
|
||||
<TextBlock Text="✓" Foreground="Green" FontWeight="Bold"/>
|
||||
<TextBlock Text="Enum properties with descriptions"/>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="0" Grid.Row="3" Orientation="Horizontal" Spacing="8" Margin="0,5,0,0">
|
||||
<TextBlock Text="✓" Foreground="Green" FontWeight="Bold"/>
|
||||
<TextBlock Text="Various data types (TimeSpan, DateTime, Guid, Lists)"/>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Grid.Row="3" Orientation="Horizontal" Spacing="8" Margin="0,5,0,0">
|
||||
<TextBlock Text="✓" Foreground="Green" FontWeight="Bold"/>
|
||||
<TextBlock Text="Password fields with PasswordPropertyText attribute"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Window>
|
||||
Reference in New Issue
Block a user