1+ <syncfusion : ChromelessWindow x : Class =" OnDemandLoading.MainWindow"
2+ xmlns =" http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+ xmlns : x =" http://schemas.microsoft.com/winfx/2006/xaml"
4+ xmlns : I =" clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
5+ xmlns : local =" clr-namespace:OnDemandLoading"
6+ xmlns : syncfusion =" http://schemas.syncfusion.com/wpf"
7+ syncfusion:LayoutControl.SetMetroMode=" True"
8+ Icon =" App.ico"
9+ WindowStartupLocation =" CenterScreen" >
10+ <syncfusion : ChromelessWindow .DataContext>
11+ <local : ViewModel />
12+ </syncfusion : ChromelessWindow .DataContext>
13+
14+ <Grid >
15+ <syncfusion : LayoutControl HeaderDescriptionText =" This sample exposes the On-demand loading of SfTreeGrid."
16+ HeaderText =" On-demand Loading"
17+ LayoutMode =" Metro"
18+ UserOptionsVisibility =" Visible" >
19+ <syncfusion : LayoutControl .GridView>
20+ <syncfusion : SfTreeGrid Name =" treeGrid"
21+ AutoGenerateColumns =" False"
22+ LoadOnDemandCommand =" {Binding CommandLoad}"
23+ ItemsSource =" {Binding EmployeeDetails}" >
24+
25+ <syncfusion : SfTreeGrid .Columns>
26+ <syncfusion : TreeGridTextColumn HeaderText =" First Name" MappingName =" FirstName" />
27+ <syncfusion : TreeGridTextColumn HeaderText =" Employee ID"
28+ MappingName =" ID"
29+ TextAlignment =" Left" />
30+
31+ <syncfusion : TreeGridTextColumn HeaderText =" Last Name" MappingName =" LastName" />
32+ <syncfusion : TreeGridTextColumn MappingName =" Title" />
33+ <syncfusion : TreeGridCurrencyColumn MappingName =" Salary" />
34+ <syncfusion : TreeGridTextColumn HeaderText =" Reports To" MappingName =" ReportsTo" />
35+ </syncfusion : SfTreeGrid .Columns>
36+
37+ </syncfusion : SfTreeGrid >
38+
39+ </syncfusion : LayoutControl .GridView>
40+ <syncfusion : LayoutControl .UserOptionsView>
41+ <syncfusion : UserOptions HeaderText =" Options" >
42+ <StackPanel x : Name =" StkPanel" Margin =" 6" >
43+ <Button Margin =" 5"
44+ Command =" local:ExpandCommand.ExpandAll"
45+ CommandTarget =" {Binding GridView,
46+ RelativeSource={RelativeSource Mode=FindAncestor,
47+ AncestorType={x:Type syncfusion:LayoutControl}}}"
48+ Content =" Expand All Nodes" />
49+ <Button Margin =" 5"
50+ Command =" local:CollapseCommand.CollapseAll"
51+ CommandTarget =" {Binding GridView,
52+ RelativeSource={RelativeSource Mode=FindAncestor,
53+ AncestorType={x:Type syncfusion:LayoutControl}}}"
54+ Content =" Collapse All Nodes" />
55+ </StackPanel >
56+ </syncfusion : UserOptions >
57+ </syncfusion : LayoutControl .UserOptionsView>
58+ </syncfusion : LayoutControl >
59+ </Grid >
60+ </syncfusion : ChromelessWindow >
0 commit comments