Loading files
797882a6aThis file is pinned to the selected release. Download the original to open it in your design tool.
<UserControl x:Class="IDE.Documents.Views.ToolBoxControl"
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:local="clr-namespace:IDE.Documents.Views"
xmlns:converters="clr-namespace:IDE.Core.Converters"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="300">
<Border BorderBrush="Black"
Background="Transparent"
BorderThickness="1">
<Grid Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<!-- Primitives panel-->
<StackPanel Grid.Row="0"
Grid.Column="0"
Margin="0,25,2,0">
<ItemsControl ItemsSource="{Binding Primitives}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button Command="{Binding DataContext.PlaceObjectCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}"
CommandParameter="{Binding}"
Focusable="False"
Width="28"
Height="28"
Padding="4"
Margin="2">
<Button.ToolTip>
<TextBlock Text="{Binding TooltipText}"
Foreground="White" />
</Button.ToolTip>
<Image Source="{Binding Type, Converter={x:Static converters:ToolboxPrimitiveToImageConverter.Instance}}"
Stretch="Uniform" />
</Button>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</Grid>
</Border>
</UserControl>