65 lines
3.5 KiB
XML
65 lines
3.5 KiB
XML
<UserControl x:Class="BeWo.View.Controls.TextModuleTreeViewControl"
|
|
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:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="300" d:DesignWidth="300">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<StackPanel Grid.Row="0" x:Name="ComboBox_TreeView_Imitation" Orientation="Horizontal" Margin="0">
|
|
<Button Content="Textbausteine" Click="OpenPopUpBtnClick" Name="OpenPopUpBtn" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />
|
|
</StackPanel>
|
|
<Popup Grid.Row="0" x:Name="TreeViewPopup" AllowsTransparency="True" Width="400"
|
|
IsOpen="False" StaysOpen="False" PopupAnimation="Slide">
|
|
<Border BorderBrush="Black" BorderThickness="2" Background="{StaticResource TextModuleBrush}">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid Grid.Row="0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Label x:Name="SearchFieldLabel" Grid.Column="0" Content="Suche" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
|
<TextBox x:Name="cbtv_search" Grid.Column="1" Margin="3" Height="23" Template="{StaticResource SearchTextBoxTemplate}" HorizontalAlignment="Stretch" TextChanged="SearchTextBox_OnTextChanged" />
|
|
</Grid>
|
|
<dxg:TreeListControl Name="TreeListControl" Grid.Column="0" Grid.Row="1" ItemsSource="{Binding Path=FilteredList, UpdateSourceTrigger=PropertyChanged}">
|
|
<dxg:TreeListColumn FieldName="Name">
|
|
<dxg:TreeListColumn.CellStyle>
|
|
<Style TargetType="dxg:LightweightCellEditor" BasedOn="{StaticResource {dxgt:GridRowThemeKey ResourceKey=LightweightCellStyle}}">
|
|
<Style.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Background" Value="#B1D6F0" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
<Setter Property="ToolTipService.ToolTip" Value="{Binding Path=RowData.Row.Text}" />
|
|
</Style>
|
|
</dxg:TreeListColumn.CellStyle>
|
|
<dxg:TreeListColumn.DisplayTemplate>
|
|
<ControlTemplate>
|
|
<TextBlock Text="{Binding Path=DataContext.RowData.Row.Name, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
|
|
FontWeight="{Binding Path=DataContext.RowData.Row.FontWeight, RelativeSource={RelativeSource TemplatedParent}}"
|
|
VerticalAlignment="Center" Margin="3,0,0,0" Padding="0" PreviewMouseLeftButtonDown="TreeListControl_OnPreviewMouseLeftButtonDown" />
|
|
</ControlTemplate>
|
|
</dxg:TreeListColumn.DisplayTemplate>
|
|
</dxg:TreeListColumn>
|
|
<dxg:TreeListControl.View>
|
|
<dxg:TreeListView Name="TreeListView" AutoWidth="True" KeyFieldName="KeyField" ParentFieldName="ParentField" AllowEditing="False" />
|
|
</dxg:TreeListControl.View>
|
|
</dxg:TreeListControl>
|
|
</Grid>
|
|
</Border>
|
|
</Popup>
|
|
</Grid>
|
|
</UserControl>
|