|
| 1 | +<syncfusion:ChromelessWindow x:Class="PrintingDemo.MainWindow" |
| 2 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 3 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 4 | + xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" |
| 5 | + xmlns:local="clr-namespace:PrintingDemo" |
| 6 | + xmlns:syncfusion="http://schemas.syncfusion.com/wpf" |
| 7 | + syncfusion:LayoutControl.SetMetroMode="True" |
| 8 | + Icon="App.ico"> |
| 9 | + <syncfusion:ChromelessWindow.DataContext> |
| 10 | + <local:EmployeeDetailsRepository /> |
| 11 | + </syncfusion:ChromelessWindow.DataContext> |
| 12 | + |
| 13 | + <Grid> |
| 14 | + |
| 15 | + <syncfusion:LayoutControl HeaderDescriptionText="This sample showcases how to print the TreeGrid content." |
| 16 | + HeaderText="Printing Demo" |
| 17 | + LayoutMode="Metro" |
| 18 | + UserOptionsVisibility="Visible"> |
| 19 | + <syncfusion:LayoutControl.GridView> |
| 20 | + <syncfusion:SfTreeGrid Name="treeGrid" |
| 21 | + AutoExpandMode="RootNodesExpanded" |
| 22 | + AutoGenerateColumns="False" |
| 23 | + ChildPropertyName="ReportsTo" |
| 24 | + ItemsSource="{Binding EmployeeDetails}" |
| 25 | + ParentPropertyName="ID" |
| 26 | + SelfRelationRootValue="-1"> |
| 27 | + |
| 28 | + <syncfusion:SfTreeGrid.Columns> |
| 29 | + <syncfusion:TreeGridTextColumn HeaderText="First Name" MappingName="FirstName" /> |
| 30 | + <syncfusion:TreeGridTextColumn HeaderText="Last Name" MappingName="LastName" /> |
| 31 | + <syncfusion:TreeGridTextColumn HeaderText="Employee ID" |
| 32 | + MappingName="ID" |
| 33 | + TextAlignment="Left" /> |
| 34 | + <syncfusion:TreeGridTextColumn MappingName="Title" /> |
| 35 | + <syncfusion:TreeGridTextColumn MappingName="City" /> |
| 36 | + <syncfusion:TreeGridCurrencyColumn CurrencyDecimalDigits="0" |
| 37 | + CurrencySymbol="$" |
| 38 | + MappingName="Salary" /> |
| 39 | + <syncfusion:TreeGridTextColumn HeaderText="Reports To" MappingName="ReportsTo" /> |
| 40 | + </syncfusion:SfTreeGrid.Columns> |
| 41 | + |
| 42 | + </syncfusion:SfTreeGrid> |
| 43 | + |
| 44 | + </syncfusion:LayoutControl.GridView> |
| 45 | + <syncfusion:LayoutControl.UserOptionsView> |
| 46 | + <syncfusion:UserOptions Grid.Column="1" HeaderText="Options"> |
| 47 | + <StackPanel Margin="5"> |
| 48 | + <Button Width="150" |
| 49 | + Margin="6" |
| 50 | + Command="local:Commands.PrintTreeGrid" |
| 51 | + CommandTarget="{Binding GridView, |
| 52 | + RelativeSource={RelativeSource Mode=FindAncestor, |
| 53 | + AncestorType={x:Type syncfusion:LayoutControl}}}" |
| 54 | + Content="Print TreeGrid" /> |
| 55 | + </StackPanel> |
| 56 | + </syncfusion:UserOptions> |
| 57 | + </syncfusion:LayoutControl.UserOptionsView> |
| 58 | + </syncfusion:LayoutControl> |
| 59 | + </Grid> |
| 60 | +</syncfusion:ChromelessWindow> |
0 commit comments