#develop (short for SharpDevelop) is a free IDE for .NET programming languages.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

91 lines
3.6 KiB

<Window x:Class="SharpDevelop.XamlDesigner.PropertyGrid.Editors.CollectionEditorDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Controls="clr-namespace:SharpDevelop.XamlDesigner.Controls"
xmlns:Converters="clr-namespace:SharpDevelop.XamlDesigner.Converters"
xmlns:PropertyGrid="clr-namespace:SharpDevelop.XamlDesigner.PropertyGrid"
Title="Collection Editor"
Background="{DynamicResource DialogBackgroundBrush}"
SnapsToDevicePixels="True"
WindowStartupLocation="CenterScreen"
ResizeMode="CanResizeWithGrip"
Width="700"
Height="570">
<DockPanel Margin="12">
<DockPanel DockPanel.Dock="Bottom"
LastChildFill="False">
<StackPanel DockPanel.Dock="Right"
Orientation="Horizontal"
Margin="0 12 0 0">
<Button x:Name="uxOkButton"
Content="OK"
IsDefault="True"
Click="uxOkButton_Click" />
<Button Content="Cancel"
IsCancel="True"
Margin="7 0 0 0" />
</StackPanel>
</DockPanel>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="285"/>
</Grid.ColumnDefinitions>
<DockPanel LastChildFill="False"
Margin="0 0 0 7">
<Button x:Name="uxChooseTypeButton"
Click="uxChooseTypeButton_Click"
Content="Choose Type..."
Width="Auto"
Padding="5 0"/>
<TextBlock Text="{Binding SelectedType.Name}" />
<Button x:Name="uxAddButton"
Click="uxAddButton_Click"
IsEnabled="{Binding CanAdd}"
DockPanel.Dock="Right"
Content="Add" />
</DockPanel>
<ListBox x:Name="uxList"
Grid.Row="1"
ItemsSource="{Binding Collection}"
SelectionMode="Extended"/>
<StackPanel Grid.Row="1"
Grid.Column="1"
VerticalAlignment="Center"
Margin="7 0 14 0">
<Button x:Name="uxUpButton"
Click="uxUpButton_Click"
IsEnabled="{Binding CanMoveUp}"
Content="Up"/>
<Button x:Name="uxDownButton"
Click="uxDownButton_Click"
IsEnabled="{Binding CanMoveDown}"
Content="Down"
Margin="0 7 0 0"/>
<Button x:Name="uxRemoveButton"
Click="uxRemoveButton_Click"
IsEnabled="{Binding CanRemove}"
Content="Remove"
Margin="0 7 0 0"/>
</StackPanel>
<PropertyGrid:PropertyGridView Grid.RowSpan="2"
Grid.Column="2"
SelectionSource="{Binding SelectedItems, ElementName=uxList}" />
</Grid>
</DockPanel>
</Window>