8 changed files with 88 additions and 8 deletions
@ -0,0 +1,17 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<UserControl |
||||||
|
x:Class="ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors.OpenCollectionEditor" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> |
||||||
|
<Grid> |
||||||
|
<TextBlock |
||||||
|
Margin="0,0,20,0" |
||||||
|
Text="{Binding Value}" VerticalAlignment="Center" /> |
||||||
|
<Button |
||||||
|
Width="15" |
||||||
|
Margin="0,0,1,0" |
||||||
|
HorizontalAlignment="Right" |
||||||
|
VerticalAlignment="Stretch" |
||||||
|
Content="..." |
||||||
|
Focusable="False" |
||||||
|
Click="open_Click" /> |
||||||
|
</Grid> |
||||||
|
</UserControl> |
||||||
@ -0,0 +1,38 @@ |
|||||||
|
using System; |
||||||
|
using System.Collections; |
||||||
|
using System.Collections.Generic; |
||||||
|
using System.Linq; |
||||||
|
using System.Text; |
||||||
|
using System.Windows; |
||||||
|
using System.Windows.Controls; |
||||||
|
using System.Windows.Data; |
||||||
|
using System.Windows.Documents; |
||||||
|
using System.Windows.Input; |
||||||
|
using System.Windows.Media; |
||||||
|
using System.Windows.Media.Imaging; |
||||||
|
using System.Windows.Navigation; |
||||||
|
using System.Windows.Shapes; |
||||||
|
|
||||||
|
using ICSharpCode.WpfDesign.PropertyGrid; |
||||||
|
//using Xceed.Wpf.Toolkit;
|
||||||
|
|
||||||
|
namespace ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors |
||||||
|
{ |
||||||
|
[TypeEditor(typeof(ICollection))] |
||||||
|
public partial class OpenCollectionEditor : UserControl |
||||||
|
{ |
||||||
|
public OpenCollectionEditor() |
||||||
|
{ |
||||||
|
InitializeComponent(); |
||||||
|
} |
||||||
|
|
||||||
|
void open_Click(object sender, RoutedEventArgs e) |
||||||
|
{ |
||||||
|
var node = this.DataContext as PropertyNode; |
||||||
|
|
||||||
|
var editor = new FlatCollectionEditor(); |
||||||
|
editor.LoadItemsCollection(node.FirstProperty); |
||||||
|
editor.ShowDialog(); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
Loading…
Reference in new issue