propertygrid

Property Grid in ExtJs

一曲冷凌霜 提交于 2019-12-02 11:52:46
I have some store, which is formed data. On panel it looks how "fieldName" and text field (in depension from invoked form). For example, on one form is displayed "name document" and field, on another: date of selling and date field. Data is formed dynamicly Here is store: tableTempStore = new Ext.data.JsonStore({ url: objectUrlAddress, baseParams: { 'objectID': objectID }, root: 'Fields', fields: [{ name: 'Type', type: 'int' }, { name: 'Value' }, { name: 'IsRequired', type: 'bool' }, { name: 'Identifier' }, { name: 'Data' }], listeners: { load: function(obj, records) { Ext.each(records,

How to serialize controls

独自空忆成欢 提交于 2019-12-02 06:39:19
问题 We have an application which contains database as xml files. It has client server architecture. So here server will read data from xml file by using dataset and store it in xml schema. Then server will serialize the data and pass it to the UI(client).So UI data’s are displayed by using Treeview on leftside, listview on right top and propertygrid on right bottom. Data’s in Ui are categorized in to classes and objects. So now we have an xml file machinesclass.xml and machineobjects.xml in our

How to enable Default Values for properties in a 'CollectionEditor' dialog

会有一股神秘感。 提交于 2019-12-02 05:36:14
问题 Please read entire question first to understand where I would have the ability to reset the default value of a property. When defining a custom class that can be visually designed, one can implement a collections editor to modify properties which are lists, arrays, collections, using the following pattern: [Editor(typeof(CollectionEditor), typeof(UITypeEditor)), DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public ElementCollection Elements { get; } Editing the

How to serialize controls

放肆的年华 提交于 2019-12-02 03:38:20
We have an application which contains database as xml files. It has client server architecture. So here server will read data from xml file by using dataset and store it in xml schema. Then server will serialize the data and pass it to the UI(client).So UI data’s are displayed by using Treeview on leftside, listview on right top and propertygrid on right bottom. Data’s in Ui are categorized in to classes and objects. So now we have an xml file machinesclass.xml and machineobjects.xml in our database. machinesclass.xml contains various classes like electronic class,computer classs

How to enable Default Values for properties in a 'CollectionEditor' dialog

╄→尐↘猪︶ㄣ 提交于 2019-12-02 02:18:56
Please read entire question first to understand where I would have the ability to reset the default value of a property. When defining a custom class that can be visually designed, one can implement a collections editor to modify properties which are lists, arrays, collections, using the following pattern: [Editor(typeof(CollectionEditor), typeof(UITypeEditor)), DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public ElementCollection Elements { get; } Editing the Elements property of this class will now launch a CollectionEditor dialog, with a list of members on the

Convert string array to enum on the fly

痞子三分冷 提交于 2019-12-01 15:49:26
I am binding an enum to a property grid like this: public enum myEnum { Ethernet, Wireless, Bluetooth } public class MyClass { public MyClass() { MyProperty = MyEnum.Wireless; } [DefaultValue(MyEnum.Wireless)] public MyEnum MyProperty { get; set; } } public Form1() { InitializeComponent(); PropertyGrid pg = new PropertyGrid(); pg.SelectedObject = new MyClass(); pg.Dock = DockStyle.Fill; this.Controls.Add(pg); } My problem: I get data on the fly when the program is running. I read the network adapter then store adapter names to myArray like this: string[] myArray = new string[] { }; myArray[0]

wpf propertyGrid

▼魔方 西西 提交于 2019-12-01 05:57:18
问题 I need a propertyGrid for my WPF application . after lots of searches I have found this I have added the assembly (exe file) when I add the propertyGrid to my form and I run it I can't see it in the form . xaml code : <Window x:Class="propertyGridTest.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:wpg="clr-namespace:Deepforest.WPF.Controls;assembly=WPGDemo" Title="Window1" Height="300" Width="300"> <Grid>

C# .Net 4.5 PropertyGrid: how to hide Properties

余生颓废 提交于 2019-12-01 04:17:41
The problem is simple(and I hope that this have a simple solution!): I want to hide ( Browsable(false) ) the property "Element" (in my PropertyGrid object) when it's zero. public class Question { ... public int Element { get; set; } } Simon Mourier What you could do is reuse the DynamicTypeDescriptor class described in my answer to this question here on SO: PropertyGrid Browsable not found for entity framework created property, how to find it? like this for example: public Form1() { InitializeComponent(); DynamicTypeDescriptor dt = new DynamicTypeDescriptor(typeof(Question)); Question q = new

How to Force use of Custom UITypeEditor for System Types

左心房为你撑大大i 提交于 2019-12-01 04:12:51
问题 I have a custom UITypeEditor that is in use for Colour Selection with my program using the propertygrid, but I can't seem to get it to activate if I just expose system.drawing.color. I need to wrap the Color with a CustomType before it will invoke my UITypeEditor. Note the Property TheColour it works. The Colour doesn't. When I open the propertyGrid, I can see GetEditStyle is called via both methods, but when it comes to EditValue it is only called when you select TheColour in the

PropertyGrid doesn't notice properties changed in code?

那年仲夏 提交于 2019-12-01 03:29:52
I have a Winform application which uses colour to highlight certain things. I would like to allow the users to change 'their' colours. As an exercise, I thought I would create an instance of a class, with properties for the colours, and assign it to a property grid (to get a nice editor) . This seems to work fine, but I then thought I would like to let the users reset the colours (after they had fiddled and set them to 20 shades of beige) . So, I added a "reset" button to my form, which set the colour properties of my object back to the defaults. However, it seems that while it sets my object