TextModuleTreeSearchView hinzugefügt
This commit is contained in:
53
BeWo/View/Search/TextModuleTreeSearchView.xaml
Normal file
53
BeWo/View/Search/TextModuleTreeSearchView.xaml
Normal file
@@ -0,0 +1,53 @@
|
||||
<UserControl x:Class="BeWo.View.Search.TextModuleTreeSearchView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:search="clr-namespace:BeWo.View.Search"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="300" Name="me">
|
||||
<UserControl.Resources>
|
||||
<search:TextModuleFontWeightConverter x:Key="TextModuleFontWeightConverter" />
|
||||
</UserControl.Resources>
|
||||
<Grid Background="Black">
|
||||
<Grid Name="Header">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Content="Suche" Foreground="White" VerticalAlignment="Center" />
|
||||
<TextBox x:Name="TextBoxSearch" Grid.Row="0" Grid.Column="1" Margin="3" Height="23" Template="{StaticResource SearchTextBoxTemplate}" TextChanged="TextBoxSearch_OnTextChanged" />
|
||||
<dxg:TreeListControl x:Name="TreeListControl" Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="0" ItemsSource="{Binding Path=List, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" PreviewMouseDown="TreeListControl_OnPreviewMouseDown">
|
||||
<dxg:TreeListControl.Columns>
|
||||
<dxg:TreeListColumn FieldName="Name" ReadOnly="True">
|
||||
<dxg:TreeListColumn.DisplayTemplate>
|
||||
<ControlTemplate>
|
||||
<TextBlock VerticalAlignment="Center" Margin="3,0,0,0" Text="{Binding DataContext.RowData.Row.Name, RelativeSource={RelativeSource TemplatedParent}}" FontWeight="{Binding Path=DataContext.RowData.Row.IsParent, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource TextModuleFontWeightConverter}}" />
|
||||
</ControlTemplate>
|
||||
</dxg:TreeListColumn.DisplayTemplate>
|
||||
<dxg:TreeListColumn.EditTemplate>
|
||||
<ControlTemplate>
|
||||
<TextBlock VerticalAlignment="Center" Margin="3,0,0,0" Text="{Binding DataContext.RowData.Row.Name, RelativeSource={RelativeSource TemplatedParent}}" FontWeight="{Binding Path=DataContext.RowData.Row.IsParent, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource TextModuleFontWeightConverter}}" />
|
||||
</ControlTemplate>
|
||||
</dxg:TreeListColumn.EditTemplate>
|
||||
<dxg:TreeListColumn.CellStyle>
|
||||
<Style TargetType="dxg:LightweightCellEditor">
|
||||
<Setter Property="ToolTipService.ToolTip" Value="{Binding Path=RowData.Row.Text}"/>
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
</Style>
|
||||
</dxg:TreeListColumn.CellStyle>
|
||||
</dxg:TreeListColumn>
|
||||
</dxg:TreeListControl.Columns>
|
||||
<dxg:TreeListControl.View>
|
||||
<dxg:TreeListView Name="TreeListView" AutoWidth="True" KeyFieldName="KeyField" ParentFieldName="ParentField" />
|
||||
</dxg:TreeListControl.View>
|
||||
</dxg:TreeListControl>
|
||||
</Grid>
|
||||
<Rectangle Fill="Gray" Opacity="0.5" Visibility="{Binding Path=IsEnabled, ElementName=me, Converter={StaticResource BoolVisibilityConverter}, ConverterParameter='false'}" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
Reference in New Issue
Block a user