This repository has been archived by the owner on Jun 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
MainWindow.xaml
38 lines (38 loc) · 2.01 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
<Window
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:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:dxdiag="http://schemas.devexpress.com/winfx/2008/xaml/diagram" x:Class="CustomToolboxExample.MainWindow"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<dxdiag:DiagramControl Grid.Row="0" Name="diagram"/>
<ListBox x:Name="ShapeListBox" Tag="{Binding ElementName=diagram}" Grid.Column="1">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="dxmvvm:Interaction.BehaviorsTemplate">
<Setter.Value>
<DataTemplate>
<ItemsControl>
<dxdiag:DiagramToolBehavior DiagramTool="{Binding}" Diagram="{Binding RelativeSource={RelativeSource AncestorType=ListBox}, Path=Tag}" />
</ItemsControl>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
</ListBox.ItemContainerStyle>
<ListBox.ItemTemplate>
<DataTemplate>
<dxdiag:ShapeToolboxPreview IsCompact="True" ViewMode="IconsOnly" Diagram="{Binding ElementName=diagram}" ItemTool="{Binding}" Theme="{Binding ElementName=diagram, Path=Theme}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</Window>