diff --git a/source/iNKORE.UI.WPF.Modern.Gallery/ControlPages/ListBoxPage.xaml b/source/iNKORE.UI.WPF.Modern.Gallery/ControlPages/ListBoxPage.xaml index 30335a4..61cd4ab 100644 --- a/source/iNKORE.UI.WPF.Modern.Gallery/ControlPages/ListBoxPage.xaml +++ b/source/iNKORE.UI.WPF.Modern.Gallery/ControlPages/ListBoxPage.xaml @@ -48,7 +48,6 @@ > Fonts } public ListBoxPage() { - this.InitializeComponent(); + InitializeComponent(); + UpdateExampleCode(); } private void ColorListBox_SelectionChanged(object sender, SelectionChangedEventArgs e) @@ -66,9 +67,45 @@ private void ListBox2_Loaded(object sender, RoutedEventArgs e) public void UpdateExampleCode() { - + Example1.Xaml = Example1Xaml; + Example2.Xaml = Example2Xaml; + Example2.CSharp = Example2CS; } + public string Example1Xaml => $@" + + Blue + Green + Red + Yellow + +"; + + public string Example2Xaml => $@" + +"; + + public string Example2CS => $@" +private List> _fonts = new List>() +{{ + new Tuple(""Arial"", new FontFamily(""Arial"")), + new Tuple(""Comic Sans MS"", new FontFamily(""Comic Sans MS"")), + new Tuple(""Courier New"", new FontFamily(""Courier New"")), + new Tuple(""Segoe UI"", new FontFamily(""Segoe UI"")), + new Tuple(""Times New Roman"", new FontFamily(""Times New Roman"")) +}}; + +public List> Fonts +{{ + get {{ return _fonts; }} +}} +"; + #endregion }