Skip to content

Commit

Permalink
Fixed PropertyGridWindow title and styling
Browse files Browse the repository at this point in the history
  • Loading branch information
Insire committed Feb 1, 2024
1 parent 1475c94 commit aa9315c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 21 deletions.
6 changes: 3 additions & 3 deletions SukiUI.Demo/Features/ControlsLibrary/PropertyGridView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@
mc:Ignorable="d">

<WrapPanel Classes="PageContainer" Orientation="Horizontal">
<controls:GlassCard Width="500" >
<controls:GlassCard Width="500">
<ScrollViewer>
<controls:PropertyGrid Item="{Binding Form}">
<controls:PropertyGrid.DataTemplates>
<!--
replace the PropertyGridTemplateSelector with your own type or subclass it,
if you want to customize the datatemplates being used
-->
<controls:PropertyGridTemplateSelector />
<controls:PropertyGridTemplateSelector UseSukiHost="False" />
</controls:PropertyGrid.DataTemplates>
</controls:PropertyGrid>
</ScrollViewer>
</controls:GlassCard>

<controls:GlassCard Width="400" >
<controls:GlassCard Width="400">
<controls:GroupBox Header="Form Output">
<ScrollViewer>
<ScrollViewer.Styles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ private async void OnMoreInfoClick(object sender, RoutedEventArgs e)

var window = new PropertyGridWindow()
{
DataContext = childViewModel.Value
DataContext = childViewModel,
};

await window.ShowDialog(parentWindow);
Expand Down
31 changes: 16 additions & 15 deletions SukiUI/Controls/PropertyGrid/PropertyGridWindow.axaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
<Window x:Class="SukiUI.Controls.PropertyGridWindow"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:SukiUI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Width="300"
Height="500"
d:DesignHeight="300"
d:DesignWidth="500"
x:DataType="controls:InstanceViewModel"
Background="{DynamicResource SukiBackground}"
mc:Ignorable="d">
<controls:SukiWindow x:Class="SukiUI.Controls.PropertyGridWindow"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:SukiUI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="{Binding DisplayName}"
Width="400"
Height="500"
d:DesignHeight="400"
d:DesignWidth="500"
x:DataType="controls:ComplexTypeViewModel"
Background="{DynamicResource SukiBackground}"
mc:Ignorable="d">

<Border Padding="5" Background="{DynamicResource SukiBackground}">
<Grid>
<ScrollViewer>
<controls:PropertyGrid Item="{Binding}">
<controls:PropertyGrid Item="{Binding Viewmodel}">
<controls:PropertyGrid.DataTemplates>

<!--
Expand All @@ -29,4 +30,4 @@
</ScrollViewer>
</Grid>
</Border>
</Window>
</controls:SukiWindow>
4 changes: 2 additions & 2 deletions SukiUI/Controls/PropertyGrid/PropertyGridWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace SukiUI.Controls
{
public partial class PropertyGridWindow : Window
public partial class PropertyGridWindow : SukiWindow
{
public PropertyGridWindow()
{
InitializeComponent();
}
}
}
}

0 comments on commit aa9315c

Please sign in to comment.