Custom property editor erase all control properties

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • R.A.F.

    #1

    Custom property editor erase all control properties

    Hi,

    I have a custom control in which i have a collection property named
    "Columns".

    this collection property add/remove column objects.
    in my Column class i have a property named Alignment which use a custom
    property editor.

    when this property editor is not linked to this property,

    My property grid displays all properties of my Column object.
    When my custom UIeditor is linked via
    [Editor(typeof(A lignmentDropDow nEditor), typeof(UITypeEd itor))] all
    properties of my Column object are hidden (property grid is empty of not
    only property value, but also categories and property names...

    where could be the mistake ?
    Could it come from property converter ?
    this property is in fact a class which consists of 2 public properties :
    Alignment -Vertical
    Alignment -Horizontal

    for information, my UIEditor is a dropdown UIEditor.

    thanks a lot,

    RAF.
  • R.A.F.

    #2
    Re: Custom property editor erase all control properties

    Ok, i found the problem... :-)

    but while my custom UIEditor is based on a UserControl of 66 x 66
    pixels, it is displayed by property editor like completly reduce and
    only on the left half of the "form" of dropdown window.

    How is it possible ?

    thx.

    RAF.


    R.A.F. wrote:
    Hi,
    >
    I have a custom control in which i have a collection property named
    "Columns".
    >
    this collection property add/remove column objects.
    in my Column class i have a property named Alignment which use a custom
    property editor.
    >
    when this property editor is not linked to this property,
    >
    My property grid displays all properties of my Column object.
    When my custom UIeditor is linked via
    [Editor(typeof(A lignmentDropDow nEditor), typeof(UITypeEd itor))] all
    properties of my Column object are hidden (property grid is empty of not
    only property value, but also categories and property names...
    >
    where could be the mistake ?
    Could it come from property converter ?
    this property is in fact a class which consists of 2 public properties :
    Alignment -Vertical
    Alignment -Horizontal
    >
    for information, my UIEditor is a dropdown UIEditor.
    >
    thanks a lot,
    >
    RAF.

    Comment

    • Nicholas Paldino [.NET/C# MVP]

      #3
      Re: Custom property editor erase all control properties

      RAF,

      The control is going to be sized by the property grid, not by you. You
      have to take into account the size that you are given, and adjust your
      control accordingly. If this doesn't work for you, then you would be better
      off using a modal dialog.


      --
      - Nicholas Paldino [.NET/C# MVP]
      - mvp@spam.guard. caspershouse.co m

      "R.A.F." <noemail@nospam .comwrote in message
      news:O1YRa70EIH A.4476@TK2MSFTN GP06.phx.gbl...
      Ok, i found the problem... :-)
      >
      but while my custom UIEditor is based on a UserControl of 66 x 66 pixels,
      it is displayed by property editor like completly reduce and only on the
      left half of the "form" of dropdown window.
      >
      How is it possible ?
      >
      thx.
      >
      RAF.
      >
      >
      R.A.F. wrote:
      >Hi,
      >>
      >I have a custom control in which i have a collection property named
      >"Columns".
      >>
      >this collection property add/remove column objects.
      >in my Column class i have a property named Alignment which use a custom
      >property editor.
      >>
      >when this property editor is not linked to this property,
      >>
      >My property grid displays all properties of my Column object.
      >When my custom UIeditor is linked via
      >[Editor(typeof(A lignmentDropDow nEditor), typeof(UITypeEd itor))] all
      >properties of my Column object are hidden (property grid is empty of not
      >only property value, but also categories and property names...
      >>
      >where could be the mistake ?
      >Could it come from property converter ?
      >this property is in fact a class which consists of 2 public properties :
      >Alignment -Vertical
      >Alignment -Horizontal
      >>
      >for information, my UIEditor is a dropdown UIEditor.
      >>
      >thanks a lot,
      >>
      >RAF.

      Comment

      Working...