From 0c7f62880c74a23c644e81f5fae82933f7c9da64 Mon Sep 17 00:00:00 2001 From: Yoojun Zhou Date: Thu, 19 Dec 2024 16:58:10 +0800 Subject: [PATCH] Example code for RelativePanel --- .../ControlPages/RelativePanelPage.xaml | 10 ------- .../ControlPages/RelativePanelPage.xaml.cs | 29 ++++++++++++++++++- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/source/iNKORE.UI.WPF.Modern.Gallery/ControlPages/RelativePanelPage.xaml b/source/iNKORE.UI.WPF.Modern.Gallery/ControlPages/RelativePanelPage.xaml index 55a4ce39..d96ba0ea 100644 --- a/source/iNKORE.UI.WPF.Modern.Gallery/ControlPages/RelativePanelPage.xaml +++ b/source/iNKORE.UI.WPF.Modern.Gallery/ControlPages/RelativePanelPage.xaml @@ -35,15 +35,5 @@ ui:RelativePanel.AlignRightWithPanel="True" Fill="Green" /> - - -<RelativePanel Width="300"> - <Rectangle x:Name="Rectangle1" Fill="Red" Height="50" Width="50"/> - <Rectangle x:Name="Rectangle2" Fill="Blue" Height="50" Width="50" RelativePanel.RightOf="Rectangle1" Margin="8,0,0,0"/> - <Rectangle x:Name="Rectangle3" Fill="Green" Height="50" Width="50" RelativePanel.AlignRightWithPanel="True"/> - <Rectangle x:Name="Rectangle4" Fill="Yellow" Height="50" Width="50" RelativePanel.Below="Rectangle3" RelativePanel.AlignHorizontalCenterWith="Rectangle3" Margin="0,8,0,0"/> -</RelativePanel> - - diff --git a/source/iNKORE.UI.WPF.Modern.Gallery/ControlPages/RelativePanelPage.xaml.cs b/source/iNKORE.UI.WPF.Modern.Gallery/ControlPages/RelativePanelPage.xaml.cs index fed6c4e5..584d68ed 100644 --- a/source/iNKORE.UI.WPF.Modern.Gallery/ControlPages/RelativePanelPage.xaml.cs +++ b/source/iNKORE.UI.WPF.Modern.Gallery/ControlPages/RelativePanelPage.xaml.cs @@ -29,10 +29,37 @@ public RelativePanelPage() public void UpdateExampleCode() { + Example1.Xaml = Example1Xaml; + } + private void Page_Loaded(object sender, RoutedEventArgs e) + { + UpdateExampleCode(); } - #endregion + public string Example1Xaml => $@" + + + + + +"; + #endregion } }