コード例 #1
0
        public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            BindableProperty bindableProperty = (BindableProperty)context.PropertyDescriptor;
            ElementProperty property = (ElementProperty)bindableProperty.Property;
            ElementCollectionViewModel collection = (ElementCollectionViewModel)property.DeclaringElement.ChildElement(property.DeclaringProperty.Name);
            IUIServiceWpf uiService = (IUIServiceWpf)context.GetService(typeof(IUIServiceWpf));

            PopupCollectionEditorWindow w = new PopupCollectionEditorWindow()
            {
                ContainedContent = new HeaderedListLayout(collection, collection.AddCommands)
            };

            uiService.ShowDialog(w);

            return value;
        }
コード例 #2
0
        public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            BindableProperty           bindableProperty = (BindableProperty)context.PropertyDescriptor;
            ElementProperty            property         = (ElementProperty)bindableProperty.Property;
            ElementCollectionViewModel collection       = (ElementCollectionViewModel)property.DeclaringElement.ChildElement(property.DeclaringProperty.Name);
            IUIServiceWpf uiService = (IUIServiceWpf)context.GetService(typeof(IUIServiceWpf));

            PopupCollectionEditorWindow w = new PopupCollectionEditorWindow()
            {
                ContainedContent = new HeaderedListLayout(collection, collection.AddCommands)
            };

            uiService.ShowDialog(w);

            return(value);
        }