Hi,
I have a class with a set of properties As given below.
class ContactInfo
{
[ReadOnly(true)]
[Category("Contact Info")]
public string Mobile { get; set; }
[Category("Contact Info")]
public string Name{ get; set; }
}
The objects of this class is being assigned to a property grid, so that the users can update an...
This might be a straightforward question, even though I haven't found an easy solution to it:
I've implemented my custom UITypeEditor with the sole purpose of adding a PaintValue to bools. For the sake of the discussion, let's assume that PaintValue will either paint a checked or unchecked radiobutton.
Question 1:
Now, here's the prob...
I'm tweaking a WinForms application. This application has a Form that contains a PropertyGrid. An object is assigned to the SelectedObject property so that the property grid displays the properties for the object.
The type of the object assigned has a property that carries an EditorAttribute specifying a UITypeEditor.
This implementa...
Hi,
I am a bit new at this .NET stuff so my aplogies in advance. I have written a class that I wish to behave as an expandable property in the property grid. I have written a Type Converter....etc. The type converter stuff is from morganskinner.com and I adapted it to C++/CLI. Everything compiles correctly except (i) the class does not ...
I have a class that is implementing a custom ToolStripItem. Everything seems to work great until I try to add the item to a ContextMenuStrip at design time. If I try to add my custom control straight from the ContextMenuStrip the PropertyGrid freezes up and will not let me modify my Checked or Text properties. But if I go into the Con...
Hi,
Let's say I have a class A and a class B. I would like to edit using .NET PropertyGrid multiple instances of A and B simultaneously. The desired behavior would be to have the intersection of properties displayed.
If A and B have static (written in the source code) properties everything works fine. Selecting A and B instances will o...
In C#, I have a class set up like so:
class Page
{
public class Element
{
private string test;
public string Test
{ get { return test; } set { test = value; } }
}
private Element element;
public Element PrimaryElement
{ get { return element; } set { element = value; } }
}
If I have a PropertyGrid where the select ob...
Property grid do not show new value of selected object.
For example:
o.val = "1";
pg.SelectedObject = o;
o.val = "2";
pg.Refresh();
The property in property grid is still "1";
It is changing only if you click on this property.
Or like that:
o.val = "1";
pg.SelectedObject = o;
o.val = "2";
pg.SelectedObject = o;
but in this case f...
I created a simple User Settings Dialog by binding the Property.Settings to a PropertyGrid.
This works like a charm but now I would like to allow only certain choices for some values. I have noticed that some Types will give a dropdown of possible choices. This is what I am shooting for but for, say, Strings.
Example, one of the ...
public interface ITest {
void Somethink();
}
public class Test1 : ITest {
public void Somethink() { /* do stuff */ }
public int Test1Property { get; set; }
}
public class Test2 : ITest {
public void Somethink() { /* do stuff */ }
public float Test2Property { get; set; }
}
//Main class
public class MainClass
{
[Type...
I'm new to C# and I've been trying to design my own program for a while now. I came a across a control named Property Grid, it suits me perfectly and aftering Googling, I managed to find how to split up the various properties into catagories using attritubtes.
But I cannot find any information on adding sub-catagories to another catago...
I would like to display static (shared) objects at runtime in a PropertyGrid but if I try to set the selected object property of the grid like this:
_propertyGrid.SelectedObject = System.Windows.Forms.Application
I get a compilation error:
'Application' is a type and cannot be
used as an expression.
Is there a way to display a...
I have an app that allows the user to choose an image, at design time, either as a straight image, or from an image list.
All cool so far, except that this is not happening from the visual studio property browser, its happening from a property grid that is a part of a type editor.
My problem is, both the image picker (actually resource...
I have a custom configuration tool for an application that uses the .Net PropertyGrid control.
The classes underneath have Color properties that are edited in the grid. If I don't decorate the attributes at all I get a drop down colour picker that lets me choose Windows system colours.
However this is for a web site, so I want hexadeci...
Hi,
I want to implement Date(DateTimePicker) in PropertyGrid. I dont have any idea about add DateTimePicker into PropertyGrid. Any one have idea plese let me know.
Thanks
...
In System.Windows.Forms there are a PropertyGrid that displays properties of an attached object. Let's say MyTextBox : TextBox.
Now, I would like to display on it some MyTextBox properties, say only Size, Location and my custom property Date.
More that than, I would like to be able to change the real property names, say "Dimension", "...
Hi,
I am working on wpf propertygrid(PG) control and I want the PG to support collection type(IList, ObservableCollection etc.) properties. I am bit confused on how to keep track of selected item(of that collection) and pass that to client.
Any ideas?
If the solution makes use of the Open Source WPF PropertyGrid (http://www.codeplex.c...
Hello,
I am using EXT-js for a project, usually everything is pretty straight forward with EXT-js, but with the propertyGrid, I am not sure.
I'd like some advice about this piece of code.
First the store to populate the property grid,
on the load event:
var configStore = new Ext.data.JsonStore({
// store config
autoLoad...
I need to change the editor for a property attached to a .net PropertyGrid, but I cannot set the Editor attribute of that property, because the property was generated by a tool, including all attributes.
The desired editor is
System.Windows.Forms.Design.FileNameEditor
I can find many tutorials on the web to assign this editor to stri...
I have a .NET PropertyGrid control which displays properties of some class. I want to change the color or font or background color(it doesn't matter just that they look different from the other displayed properties) of some property. I can do with writing custom editor but I was wondering
If an easier method exists?
If I use custom e...