Web Server Control and property tree in design time like Font has.

Discussion in 'ASP .Net Web Controls' started by Mirek Endys, Nov 11, 2005.

  1. Mirek Endys

    Mirek Endys Guest

    I have Web Server Control and I have there a property that is myClass type.
    I want to display this property in design time property toolbox as property
    type Font: each public property of myClass type to show in tree (like Font
    properties).

    What should I to do??

    Thanks

    Mirek
     
    Mirek Endys, Nov 11, 2005
    #1
    1. Advertising

  2. Hi Mirek,

    We have reviewed this issue and are currently researching on it. We will
    update you ASAP. Thanks for your patience!

    Kevin Yu
    =======
    "This posting is provided "AS IS" with no warranties, and confers no
    rights."
     
    Kevin Yu [MSFT], Nov 12, 2005
    #2
    1. Advertising

  3. Hi Mirek,

    As for the the making a expandable custom property in our custom ASP.NET
    web server control question you mentioned, I think we need to do the
    following thins for our web control and that property:

    1. As for the property which we want it be expandable, we should use the
    TypeConverter(typeof(ExpandableObjectConverter)),

    attribute to mark it so that IDE can use expandableObjectConvevter to
    parsing it hierarchially.

    2. As for a property in a webserver control, we still need to make it
    persisted in inline html as inner property or attrirbute, so the
    PersisteMode and DesignerSerializationVisibility attribute are also needed.


    To make it clearly, here is a example I've made and worked well in my local
    enviornment (VS.NET 2005 PRO, WIN2K3 .NET 2.0....)

    Hope helps. Thanks,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)

    ============================
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Text;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.ComponentModel.Design;
    using System.Drawing.Design;
    using System.Web.UI.Design;


    namespace ControlLibrary
    {

    [
    ToolboxData("<{0}:CustomPropertyControl
    runat=server></{0}:CustomPropertyControl>"),
    Designer(typeof(CustomPropertyControlDesigner)), Serializable()]
    public class CustomPropertyControl : WebControl
    {

    private MyName _username = new MyName();

    [Browsable(true), NotifyParentProperty(true),
    PersistenceMode(PersistenceMode.InnerProperty),

    DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
    public MyName UserName
    {
    get
    {
    return _username;
    }
    set
    {
    _username = value;
    }

    }

    protected override void RenderContents(HtmlTextWriter output)
    {


    if(UserName != null)
    output.Write("<br>Name: " + UserName.FirstName + ", " +
    UserName.LastName);
    }
    }


    [TypeConverter(typeof(ExpandableObjectConverter)),
    Browsable(true),
    Category("Data"),
    RefreshProperties(RefreshProperties.Repaint),
    Serializable(),
    DefaultPropertyAttribute("FirstName"),
    ToolboxItem(false),
    Description("UserName Property class")]
    public class MyName
    {
    private string _fname;
    private string _lname;

    public MyName()
    {
    _fname = string.Empty;
    _lname = string.Empty;
    }

    public MyName(string firstname, string lastname)
    {
    _fname = firstname;
    _lname = lastname;
    }

    [NotifyParentProperty(true)]
    public string FirstName
    {
    get { return _fname; }
    set { _fname = value; }
    }

    [NotifyParentProperty(true)]
    public string LastName
    {
    get { return _lname; }
    set { _lname = value; }
    }
    }


    public class CustomPropertyControlDesigner : ControlDesigner
    {
    public override string GetDesignTimeHtml()
    {
    return "<br/><font size='20'>CustomPropertyControl Design-Time
    HTML.</font>";
    }
    }
    }
    =============================================
    --------------------
    | From: "Mirek Endys" <>
    | Subject: Web Server Control and property tree in design time like Font
    has.
    | Date: Fri, 11 Nov 2005 16:23:19 +0100
    | Lines: 13
    | X-Priority: 3
    | X-MSMail-Priority: Normal
    | X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
    | X-RFC2646: Format=Flowed; Original
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
    | Message-ID: <O$>
    | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
    | NNTP-Posting-Host: gw.coty.cz 195.47.52.129
    | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
    | Xref: TK2MSFTNGXA02.phx.gbl
    microsoft.public.dotnet.framework.aspnet.webcontrols:31086
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
    |
    | I have Web Server Control and I have there a property that is myClass
    type.
    | I want to display this property in design time property toolbox as
    property
    | type Font: each public property of myClass type to show in tree (like
    Font
    | properties).
    |
    | What should I to do??
    |
    | Thanks
    |
    | Mirek
    |
    |
    |
    |
     
    Steven Cheng[MSFT], Nov 14, 2005
    #3
  4. Hi Mirek,

    How are you doing on this? Does the suggestions in my last message helps
    you? If there're anything else we can help, please feel free to post here.
    Thanks,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
    --------------------
    | X-Tomcat-ID: 101422756
    | References: <O$>
    | MIME-Version: 1.0
    | Content-Type: text/plain
    | Content-Transfer-Encoding: 7bit
    | From: (Steven Cheng[MSFT])
    | Organization: Microsoft
    | Date: Mon, 14 Nov 2005 06:24:21 GMT
    | Subject: RE: Web Server Control and property tree in design time like
    Font has.
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
    | Message-ID: <>
    | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
    | Lines: 119
    | Path: TK2MSFTNGXA02.phx.gbl
    | Xref: TK2MSFTNGXA02.phx.gbl
    microsoft.public.dotnet.framework.aspnet.webcontrols:31127
    | NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
    |
    | Hi Mirek,
    |
    | As for the the making a expandable custom property in our custom ASP.NET
    | web server control question you mentioned, I think we need to do the
    | following thins for our web control and that property:
    |
    | 1. As for the property which we want it be expandable, we should use the
    | TypeConverter(typeof(ExpandableObjectConverter)),
    |
    | attribute to mark it so that IDE can use expandableObjectConvevter to
    | parsing it hierarchially.
    |
    | 2. As for a property in a webserver control, we still need to make it
    | persisted in inline html as inner property or attrirbute, so the
    | PersisteMode and DesignerSerializationVisibility attribute are also
    needed.
    |
    |
    | To make it clearly, here is a example I've made and worked well in my
    local
    | enviornment (VS.NET 2005 PRO, WIN2K3 .NET 2.0....)
    |
    | Hope helps. Thanks,
    |
    | Steven Cheng
    | Microsoft Online Support
    |
    | Get Secure! www.microsoft.com/security
    | (This posting is provided "AS IS", with no warranties, and confers no
    | rights.)
    |
    | ============================
    | using System;
    | using System.Collections.Generic;
    | using System.ComponentModel;
    | using System.Text;
    | using System.Web;
    | using System.Web.UI;
    | using System.Web.UI.WebControls;
    | using System.ComponentModel.Design;
    | using System.Drawing.Design;
    | using System.Web.UI.Design;
    |
    |
    | namespace ControlLibrary
    | {
    |
    | [
    | ToolboxData("<{0}:CustomPropertyControl
    | runat=server></{0}:CustomPropertyControl>"),
    | Designer(typeof(CustomPropertyControlDesigner)), Serializable()]
    | public class CustomPropertyControl : WebControl
    | {
    |
    | private MyName _username = new MyName();
    |
    | [Browsable(true), NotifyParentProperty(true),
    | PersistenceMode(PersistenceMode.InnerProperty),
    |
    | DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
    | public MyName UserName
    | {
    | get
    | {
    | return _username;
    | }
    | set
    | {
    | _username = value;
    | }
    |
    | }
    |
    | protected override void RenderContents(HtmlTextWriter output)
    | {
    |
    |
    | if(UserName != null)
    | output.Write("<br>Name: " + UserName.FirstName + ", " +
    | UserName.LastName);
    | }
    | }
    |
    |
    | [TypeConverter(typeof(ExpandableObjectConverter)),
    | Browsable(true),
    | Category("Data"),
    | RefreshProperties(RefreshProperties.Repaint),
    | Serializable(),
    | DefaultPropertyAttribute("FirstName"),
    | ToolboxItem(false),
    | Description("UserName Property class")]
    | public class MyName
    | {
    | private string _fname;
    | private string _lname;
    |
    | public MyName()
    | {
    | _fname = string.Empty;
    | _lname = string.Empty;
    | }
    |
    | public MyName(string firstname, string lastname)
    | {
    | _fname = firstname;
    | _lname = lastname;
    | }
    |
    | [NotifyParentProperty(true)]
    | public string FirstName
    | {
    | get { return _fname; }
    | set { _fname = value; }
    | }
    |
    | [NotifyParentProperty(true)]
    | public string LastName
    | {
    | get { return _lname; }
    | set { _lname = value; }
    | }
    | }
    |
    |
    | public class CustomPropertyControlDesigner : ControlDesigner
    | {
    | public override string GetDesignTimeHtml()
    | {
    | return "<br/><font size='20'>CustomPropertyControl
    Design-Time
    | HTML.</font>";
    | }
    | }
    | }
    | =============================================
    | --------------------
    | | From: "Mirek Endys" <>
    | | Subject: Web Server Control and property tree in design time like Font
    | has.
    | | Date: Fri, 11 Nov 2005 16:23:19 +0100
    | | Lines: 13
    | | X-Priority: 3
    | | X-MSMail-Priority: Normal
    | | X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
    | | X-RFC2646: Format=Flowed; Original
    | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
    | | Message-ID: <O$>
    | | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
    | | NNTP-Posting-Host: gw.coty.cz 195.47.52.129
    | | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
    | | Xref: TK2MSFTNGXA02.phx.gbl
    | microsoft.public.dotnet.framework.aspnet.webcontrols:31086
    | | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
    | |
    | | I have Web Server Control and I have there a property that is myClass
    | type.
    | | I want to display this property in design time property toolbox as
    | property
    | | type Font: each public property of myClass type to show in tree (like
    | Font
    | | properties).
    | |
    | | What should I to do??
    | |
    | | Thanks
    | |
    | | Mirek
    | |
    | |
    | |
    | |
    |
    |
     
    Steven Cheng[MSFT], Nov 16, 2005
    #4
  5. Mirek Endys

    Mirek Endys Guest

    RE: Web Server Control and property tree in design time like Font

    Yes, it helps me. You are GURU :)
    I thought that it will be an attribute. But I didnt know which.

    Thanks alot.


    "Steven Cheng[MSFT]" wrote:

    > Hi Mirek,
    >
    > How are you doing on this? Does the suggestions in my last message helps
    > you? If there're anything else we can help, please feel free to post here.
    > Thanks,
    >
    > Steven Cheng
    > Microsoft Online Support
    >
    > Get Secure! www.microsoft.com/security
    > (This posting is provided "AS IS", with no warranties, and confers no
    > rights.)
    > --------------------
    > | X-Tomcat-ID: 101422756
    > | References: <O$>
    > | MIME-Version: 1.0
    > | Content-Type: text/plain
    > | Content-Transfer-Encoding: 7bit
    > | From: (Steven Cheng[MSFT])
    > | Organization: Microsoft
    > | Date: Mon, 14 Nov 2005 06:24:21 GMT
    > | Subject: RE: Web Server Control and property tree in design time like
    > Font has.
    > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
    > | Message-ID: <>
    > | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
    > | Lines: 119
    > | Path: TK2MSFTNGXA02.phx.gbl
    > | Xref: TK2MSFTNGXA02.phx.gbl
    > microsoft.public.dotnet.framework.aspnet.webcontrols:31127
    > | NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
    > |
    > | Hi Mirek,
    > |
    > | As for the the making a expandable custom property in our custom ASP.NET
    > | web server control question you mentioned, I think we need to do the
    > | following thins for our web control and that property:
    > |
    > | 1. As for the property which we want it be expandable, we should use the
    > | TypeConverter(typeof(ExpandableObjectConverter)),
    > |
    > | attribute to mark it so that IDE can use expandableObjectConvevter to
    > | parsing it hierarchially.
    > |
    > | 2. As for a property in a webserver control, we still need to make it
    > | persisted in inline html as inner property or attrirbute, so the
    > | PersisteMode and DesignerSerializationVisibility attribute are also
    > needed.
    > |
    > |
    > | To make it clearly, here is a example I've made and worked well in my
    > local
    > | enviornment (VS.NET 2005 PRO, WIN2K3 .NET 2.0....)
    > |
    > | Hope helps. Thanks,
    > |
    > | Steven Cheng
    > | Microsoft Online Support
    > |
    > | Get Secure! www.microsoft.com/security
    > | (This posting is provided "AS IS", with no warranties, and confers no
    > | rights.)
    > |
    > | ============================
    > | using System;
    > | using System.Collections.Generic;
    > | using System.ComponentModel;
    > | using System.Text;
    > | using System.Web;
    > | using System.Web.UI;
    > | using System.Web.UI.WebControls;
    > | using System.ComponentModel.Design;
    > | using System.Drawing.Design;
    > | using System.Web.UI.Design;
    > |
    > |
    > | namespace ControlLibrary
    > | {
    > |
    > | [
    > | ToolboxData("<{0}:CustomPropertyControl
    > | runat=server></{0}:CustomPropertyControl>"),
    > | Designer(typeof(CustomPropertyControlDesigner)), Serializable()]
    > | public class CustomPropertyControl : WebControl
    > | {
    > |
    > | private MyName _username = new MyName();
    > |
    > | [Browsable(true), NotifyParentProperty(true),
    > | PersistenceMode(PersistenceMode.InnerProperty),
    > |
    > | DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
    > | public MyName UserName
    > | {
    > | get
    > | {
    > | return _username;
    > | }
    > | set
    > | {
    > | _username = value;
    > | }
    > |
    > | }
    > |
    > | protected override void RenderContents(HtmlTextWriter output)
    > | {
    > |
    > |
    > | if(UserName != null)
    > | output.Write("<br>Name: " + UserName.FirstName + ", " +
    > | UserName.LastName);
    > | }
    > | }
    > |
    > |
    > | [TypeConverter(typeof(ExpandableObjectConverter)),
    > | Browsable(true),
    > | Category("Data"),
    > | RefreshProperties(RefreshProperties.Repaint),
    > | Serializable(),
    > | DefaultPropertyAttribute("FirstName"),
    > | ToolboxItem(false),
    > | Description("UserName Property class")]
    > | public class MyName
    > | {
    > | private string _fname;
    > | private string _lname;
    > |
    > | public MyName()
    > | {
    > | _fname = string.Empty;
    > | _lname = string.Empty;
    > | }
    > |
    > | public MyName(string firstname, string lastname)
    > | {
    > | _fname = firstname;
    > | _lname = lastname;
    > | }
    > |
    > | [NotifyParentProperty(true)]
    > | public string FirstName
    > | {
    > | get { return _fname; }
    > | set { _fname = value; }
    > | }
    > |
    > | [NotifyParentProperty(true)]
    > | public string LastName
    > | {
    > | get { return _lname; }
    > | set { _lname = value; }
    > | }
    > | }
    > |
    > |
    > | public class CustomPropertyControlDesigner : ControlDesigner
    > | {
    > | public override string GetDesignTimeHtml()
    > | {
    > | return "<br/><font size='20'>CustomPropertyControl
    > Design-Time
    > | HTML.</font>";
    > | }
    > | }
    > | }
    > | =============================================
    > | --------------------
    > | | From: "Mirek Endys" <>
    > | | Subject: Web Server Control and property tree in design time like Font
    > | has.
    > | | Date: Fri, 11 Nov 2005 16:23:19 +0100
    > | | Lines: 13
    > | | X-Priority: 3
    > | | X-MSMail-Priority: Normal
    > | | X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
    > | | X-RFC2646: Format=Flowed; Original
    > | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
    > | | Message-ID: <O$>
    > | | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
    > | | NNTP-Posting-Host: gw.coty.cz 195.47.52.129
    > | | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
    > | | Xref: TK2MSFTNGXA02.phx.gbl
    > | microsoft.public.dotnet.framework.aspnet.webcontrols:31086
    > | | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
    > | |
    > | | I have Web Server Control and I have there a property that is myClass
    > | type.
    > | | I want to display this property in design time property toolbox as
    > | property
    > | | type Font: each public property of myClass type to show in tree (like
    > | Font
    > | | properties).
    > | |
    > | | What should I to do??
    > | |
    > | | Thanks
    > | |
    > | | Mirek
    > | |
    > | |
    > | |
    > | |
    > |
    > |
    >
    >
     
    Mirek Endys, Nov 16, 2005
    #5
  6. RE: Web Server Control and property tree in design time like Font

    You're welcome Mirek,

    Good luck!

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
    --------------------
    | Thread-Topic: Web Server Control and property tree in design time like
    Font
    | thread-index: AcXq+3gJJlgif5QpRsKHOdA8lAkZIg==
    | X-WBNR-Posting-Host: 86.49.58.229
    | From: "=?Utf-8?B?TWlyZWsgRW5keXM=?=" <Mirek
    >
    | References: <O$>
    <>
    <>
    | Subject: RE: Web Server Control and property tree in design time like Font
    | Date: Wed, 16 Nov 2005 14:17:02 -0800
    | Lines: 216
    | Message-ID: <>
    | MIME-Version: 1.0
    | Content-Type: text/plain;
    | charset="Utf-8"
    | Content-Transfer-Encoding: 7bit
    | X-Newsreader: Microsoft CDO for Windows 2000
    | Content-Class: urn:content-classes:message
    | Importance: normal
    | Priority: normal
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
    | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
    | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
    | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
    | Xref: TK2MSFTNGXA02.phx.gbl
    microsoft.public.dotnet.framework.aspnet.webcontrols:31177
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
    |
    | Yes, it helps me. You are GURU :)
    | I thought that it will be an attribute. But I didnt know which.
    |
    | Thanks alot.
    |
    |
    | "Steven Cheng[MSFT]" wrote:
    |
    | > Hi Mirek,
    | >
    | > How are you doing on this? Does the suggestions in my last message
    helps
    | > you? If there're anything else we can help, please feel free to post
    here.
    | > Thanks,
    | >
    | > Steven Cheng
    | > Microsoft Online Support
    | >
    | > Get Secure! www.microsoft.com/security
    | > (This posting is provided "AS IS", with no warranties, and confers no
    | > rights.)
    | > --------------------
    | > | X-Tomcat-ID: 101422756
    | > | References: <O$>
    | > | MIME-Version: 1.0
    | > | Content-Type: text/plain
    | > | Content-Transfer-Encoding: 7bit
    | > | From: (Steven Cheng[MSFT])
    | > | Organization: Microsoft
    | > | Date: Mon, 14 Nov 2005 06:24:21 GMT
    | > | Subject: RE: Web Server Control and property tree in design time like
    | > Font has.
    | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
    | > | Message-ID: <>
    | > | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
    | > | Lines: 119
    | > | Path: TK2MSFTNGXA02.phx.gbl
    | > | Xref: TK2MSFTNGXA02.phx.gbl
    | > microsoft.public.dotnet.framework.aspnet.webcontrols:31127
    | > | NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
    | > |
    | > | Hi Mirek,
    | > |
    | > | As for the the making a expandable custom property in our custom
    ASP.NET
    | > | web server control question you mentioned, I think we need to do the
    | > | following thins for our web control and that property:
    | > |
    | > | 1. As for the property which we want it be expandable, we should use
    the
    | > | TypeConverter(typeof(ExpandableObjectConverter)),
    | > |
    | > | attribute to mark it so that IDE can use expandableObjectConvevter to
    | > | parsing it hierarchially.
    | > |
    | > | 2. As for a property in a webserver control, we still need to make it
    | > | persisted in inline html as inner property or attrirbute, so the
    | > | PersisteMode and DesignerSerializationVisibility attribute are also
    | > needed.
    | > |
    | > |
    | > | To make it clearly, here is a example I've made and worked well in my
    | > local
    | > | enviornment (VS.NET 2005 PRO, WIN2K3 .NET 2.0....)
    | > |
    | > | Hope helps. Thanks,
    | > |
    | > | Steven Cheng
    | > | Microsoft Online Support
    | > |
    | > | Get Secure! www.microsoft.com/security
    | > | (This posting is provided "AS IS", with no warranties, and confers no
    | > | rights.)
    | > |
    | > | ============================
    | > | using System;
    | > | using System.Collections.Generic;
    | > | using System.ComponentModel;
    | > | using System.Text;
    | > | using System.Web;
    | > | using System.Web.UI;
    | > | using System.Web.UI.WebControls;
    | > | using System.ComponentModel.Design;
    | > | using System.Drawing.Design;
    | > | using System.Web.UI.Design;
    | > |
    | > |
    | > | namespace ControlLibrary
    | > | {
    | > |
    | > | [
    | > | ToolboxData("<{0}:CustomPropertyControl
    | > | runat=server></{0}:CustomPropertyControl>"),
    | > | Designer(typeof(CustomPropertyControlDesigner)), Serializable()]
    | > | public class CustomPropertyControl : WebControl
    | > | {
    | > |
    | > | private MyName _username = new MyName();
    | > |
    | > | [Browsable(true), NotifyParentProperty(true),
    | > | PersistenceMode(PersistenceMode.InnerProperty),
    | > |
    | > |
    DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
    | > | public MyName UserName
    | > | {
    | > | get
    | > | {
    | > | return _username;
    | > | }
    | > | set
    | > | {
    | > | _username = value;
    | > | }
    | > |
    | > | }
    | > |
    | > | protected override void RenderContents(HtmlTextWriter output)
    | > | {
    | > |
    | > |
    | > | if(UserName != null)
    | > | output.Write("<br>Name: " + UserName.FirstName + ", " +
    | > | UserName.LastName);
    | > | }
    | > | }
    | > |
    | > |
    | > | [TypeConverter(typeof(ExpandableObjectConverter)),
    | > | Browsable(true),
    | > | Category("Data"),
    | > | RefreshProperties(RefreshProperties.Repaint),
    | > | Serializable(),
    | > | DefaultPropertyAttribute("FirstName"),
    | > | ToolboxItem(false),
    | > | Description("UserName Property class")]
    | > | public class MyName
    | > | {
    | > | private string _fname;
    | > | private string _lname;
    | > |
    | > | public MyName()
    | > | {
    | > | _fname = string.Empty;
    | > | _lname = string.Empty;
    | > | }
    | > |
    | > | public MyName(string firstname, string lastname)
    | > | {
    | > | _fname = firstname;
    | > | _lname = lastname;
    | > | }
    | > |
    | > | [NotifyParentProperty(true)]
    | > | public string FirstName
    | > | {
    | > | get { return _fname; }
    | > | set { _fname = value; }
    | > | }
    | > |
    | > | [NotifyParentProperty(true)]
    | > | public string LastName
    | > | {
    | > | get { return _lname; }
    | > | set { _lname = value; }
    | > | }
    | > | }
    | > |
    | > |
    | > | public class CustomPropertyControlDesigner : ControlDesigner
    | > | {
    | > | public override string GetDesignTimeHtml()
    | > | {
    | > | return "<br/><font size='20'>CustomPropertyControl
    | > Design-Time
    | > | HTML.</font>";
    | > | }
    | > | }
    | > | }
    | > | =============================================
    | > | --------------------
    | > | | From: "Mirek Endys" <>
    | > | | Subject: Web Server Control and property tree in design time like
    Font
    | > | has.
    | > | | Date: Fri, 11 Nov 2005 16:23:19 +0100
    | > | | Lines: 13
    | > | | X-Priority: 3
    | > | | X-MSMail-Priority: Normal
    | > | | X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
    | > | | X-RFC2646: Format=Flowed; Original
    | > | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
    | > | | Message-ID: <O$>
    | > | | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
    | > | | NNTP-Posting-Host: gw.coty.cz 195.47.52.129
    | > | | Path:
    TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
    | > | | Xref: TK2MSFTNGXA02.phx.gbl
    | > | microsoft.public.dotnet.framework.aspnet.webcontrols:31086
    | > | | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
    | > | |
    | > | | I have Web Server Control and I have there a property that is
    myClass
    | > | type.
    | > | | I want to display this property in design time property toolbox as
    | > | property
    | > | | type Font: each public property of myClass type to show in tree
    (like
    | > | Font
    | > | | properties).
    | > | |
    | > | | What should I to do??
    | > | |
    | > | | Thanks
    | > | |
    | > | | Mirek
    | > | |
    | > | |
    | > | |
    | > | |
    | > |
    | > |
    | >
    | >
    |
     
    Steven Cheng[MSFT], Nov 17, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Tmlja3k=?=
    Replies:
    2
    Views:
    715
    Matt Berther
    Feb 20, 2005
  2. teddykim
    Replies:
    5
    Views:
    406
    Steven J Sobol
    Jul 21, 2004
  3. Stub

    B tree, B+ tree and B* tree

    Stub, Nov 12, 2003, in forum: C Programming
    Replies:
    3
    Views:
    10,133
  4. mttc
    Replies:
    2
    Views:
    2,408
    Roedy Green
    Jul 3, 2009
  5. Ryan Taylor

    using the Items property in the design time property window

    Ryan Taylor, Feb 8, 2005, in forum: ASP .Net Building Controls
    Replies:
    4
    Views:
    539
    Paul Louth
    Feb 18, 2005
Loading...

Share This Page