propertygrid

Visual C++ PropertyGrid Multi-dimensional arrays

I'm using Visual C++ 2008 and I'm trying to expose a multi-dimensional array in a property grid but I'm not getting the functionality I expect or want. property array<int,2>^ TestFixArr2D { array<int,2>^ get() { return testFixArr2D; } void set(array<int,2>^ value) { testFixArr2D = value; } } What I get is Int32[.] Ar...

Implementing sub fields in a PropertyGrid

Alright so my terminology when it comes to C# isn't great, so I'll attempt to explain this with a small example. If you create a class which you are using within a PropertyGrid and you have the following values: class Test { public Point example { get; set; } } This will produce a PropertyGrid which has an expandable object "exam...

How to allow user to set expressions detrmining property value in PropertyGrid

I noticed that programs like Report Builder allow user to set property value or an expression determining property value. I want to the add same functionality to my application. So is there any simple way to do so or do i have to redefine all type converters so that they allow to set expression in addition to their original functionality...

A point class editable in both PropertyGrid and CollectionEditor

I have the following point class definition along with its type converter, and ... [TypeConverterAttribute(typeof(MyPointConverter))] public class MyPoint { public MyPoint(double x, double y) { X = x; Y = y; } public MyPoint() { } public double X { get; set; } public double Y { get; set;...

C# Winforms: PropertyGrid not updated when item added to Collection

I've got a custom class which can be edited through the PropertyGrid. In that class I've got a custom Collection (with custom PropertyDescriptor and TypeConverter). Items can be added to or removed from the Collection with the default Collection Editor. This all works fine. But - after closing the Collection Editor, the PropertyGrid is...

PropertyGrid - is it customizable?

I have a project in that we have to represent some graphic objects on a usercontrol in WYSIWYG. Also is required to edit each objects properties(Color, Location, etc). I hesitate between using PropertyGrid ('direct' properties edit) and custom forms on DoubleClick ('indirect' edit). The PropertyGrid is very well but should correspo...

C# Propertygrid property nullable

In a project in C# (.Net 2.0) I use a propertygrid. This propertygrid displays objects retrieved from a PHP backend via SOAP. Some objects contain string properties where the meaning of an empty string is different compared to the meaning of a string that's NULL. An example of an object returned by a SOAP call might be: SomeObject { P...

C# PropertyGrid: Create Expandable item when value is null

I have class (ClassA) with some public properties. One of the properties (ClassBValue) is of a class type (ClassB) which has some public properties, too. Now I want to show ClassA objects in a PropertyGrid. I use the [TypeConverter(typeof(ExpandableObjectConverter))] Attribute for the ClassB property of ClassA. The problem is, that...

Inherit the UITypeEditor from Interface in PropertyGrid

As Attributes inherited from interfaces are not returned by the GetAttributes method, the PropertyGrid doesn't show the UITypeEditor associated with a property which is inherited from the Interface. To get it working I need to add the attribute to every time that implements the Interface. Is there any method in PropertyGrid that I can ...

Updating a PropertyGrid

How can I have a property grid update automatically when the object in its SelectedObject property changes? I've tried implementing INotifyPropertyChanged in my class but the property grid does not actually show the new propertyies of the object in the background until I click on it. I've tried subscribing to the PropertyChanged event ...

Keeping track of dependency property value changes at global level

Hi, I am having a number of controls in my application(which user can add to canvas), each having various properties(mostly dependency properties). User can change its properties through property grid(like color, text etc.). I have save functionality implemented, so if user makes any change in canvas we ask him to save the document bef...

Is there an existing PropertyGrid UITypeEditor for type "ChartColorPalette" ?

Hi, I'm trying to write a simple property grid to allow the users to modify the colours of a Chart. By default, a Chart has a "Palette" property, which is of the enumeration type "ChartColorPalette". If the object which underlies my property grid also has a "Palette" property of the same type, I get the drop-down list of possible values...

Show DebuggerDisplay in PropertyGrid C#

I was wondering if it is possible to have the debugger display be the text for the class in the PropertyGrid? I cant seem to find this answer anywhere. Here is an example of what I have. [DebuggerDisplay("FPS = {FPS}")] [TypeConverter(typeof(ExpandableObjectConverter))] public class DebugModule : Module { public int FPS {get; set...

Separating visual attributes from data classes?

I'm trying to figure out the right way to do this. I have a WinForms app that is using a PropertyGrid as one of the controls; I'm using the .SelectedObject property to assign the appropriate object to display attributes for. The PropertyGrid uses declared attributes against this object's class properties to determine visual things, e....

Change the forecolor of read-only properties in a propertygrid

I'm using a WinForms property grid to display the properties of an object. However, most of the properties are read only and thus show up as grey rather then black. Is there a way to customize the colors that are used? I'd like the disabled properties to be a bit easier to read. BTW: I think the answer to this question might be related ...

How to implement IWindowsFormsEditorService in C# ? a.k.a Simulating In-Place Editing in Windows Forms.

I would like to implement a custom Windows-Forms based control similar to the Visual Studio property grid. For this, albeit much simpler. I would ideally like to replicate the behavior of the IWindowsFormsEditorService interface, that is used to trigger in-place editing in the property grid by calling client-specified UITypeEditor implem...

How do I make somthing visible when the mouse moves across a button?

How do I show a PropertyGrid instead of a context menu, so when the user clicks somewhere else, it will hide (like a context menu)? ...

Updating property in PropertyGrid when value of property is changed elsewhere?

Hey guys, We have an object that is assigned to a PropertyGrid using the SelectedObject property of the PropertyGrid. This object contains a few properties which get updated by code in various places. For the purpose of this example, assume one is a simple update (ie: caused by the following code - Person.FirstName = "Gareth"), and that...

How to display a dynamic object in property grid?

I have a custom object type which has to be editable in PropertyGrid: public class CustomObjectType { public string Name { get; set; } public List<CustomProperty> Properties {get; set;} } Which has a list of custom properties: public class CustomProperty { public string Name { get; set; } public string Desc { ...

How to add validation to PropertyGrid's CollectionEditor?

I'm using PropertyGrid to edit an object containing a collection. Collection is edited using the CollectionEditor. I have to make sure elements in collection are unique. How can I add validation to CollectionEditor: By either overloading CollectionEditor's OnFormClosing Or adding validation for creating/editing items? ...