-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
53 lines (51 loc) · 3.31 KB
/
MainWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<dx:ThemedWindow x:Class="IsReadOnlyBindingExample.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:IsReadOnlyBindingExample"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
mc:Ignorable="d"
Title="IsReadOnlyBinding Example" Height="450" Width="800"
dx:ThemeManager.ThemeName="Office2019Colorful">
<Window.Resources>
<local:EmployeesTasks x:Key="employeeTasks" />
<local:EmployeeTaskImageSelector x:Key="taskImageSelector" />
</Window.Resources>
<Grid>
<dxg:TreeListControl x:Name="treeList"
ItemsSource="{Binding Path=EditableDataSource, Source={StaticResource employeeTasks}}">
<dxg:TreeListControl.Columns>
<dxg:TreeListColumn FieldName="Name" Header="Task" Width="*"/>
<dxg:TreeListColumn FieldName="Employee" Header="Assignee" Width="150">
<dxg:TreeListColumn.EditSettings>
<dxe:ComboBoxEditSettings ItemsSource="{Binding Path=EmployeeNames, Source={StaticResource employeeTasks}}" AutoComplete="True"/>
</dxg:TreeListColumn.EditSettings>
</dxg:TreeListColumn>
<dxg:TreeListColumn FieldName="Status" Header="Progress" FixedWidth="True" Width="100" IsReadOnlyBinding="{Binding HasSubtasks}">
<dxg:TreeListColumn.CellDisplayTemplate>
<DataTemplate>
<dxe:ProgressBarEdit Name="PART_Editor" ContentDisplayMode="Value" IsPercent="True" DisplayFormatString="p0"/>
</DataTemplate>
</dxg:TreeListColumn.CellDisplayTemplate>
</dxg:TreeListColumn>
<dxg:TreeListColumn FieldName="StartDate" Width="100" IsEnabledBinding="{Binding IsCompleted, Converter={dx:BoolInverseConverter}}"/>
<dxg:TreeListColumn FieldName="DueDate" Width="100" IsEnabledBinding="{Binding IsCompleted, Converter={dx:BoolInverseConverter}}"/>
</dxg:TreeListControl.Columns>
<dxg:TreeListControl.View>
<dxg:TreeListView x:Name="view"
KeyFieldName="ID"
ParentFieldName="ParentID"
AutoExpandAllNodes="True"
TreeColumnFieldName="Name"
NavigationStyle="Cell"
ShowNodeImages="True"
NodeImageSelector="{StaticResource taskImageSelector}"
UseLegacyFilterPanel="False">
</dxg:TreeListView>
</dxg:TreeListControl.View>
</dxg:TreeListControl>
</Grid>
</dx:ThemedWindow>