Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1125
Expose UltraFormattedLinkLabel.Value propety with design time editor on usercontrol
posted

Hi

I have created a user control that includes an UltraFormattedLinkLabel.  I've exposed the label's value property on my usercontrol, but it doesn't then have the ellipsis button next to it that opens your 'Edit Formatted Text' form.  Is there any way I can make it show?

For the standard .net controls I'd set the Editor attribute like this:

    <Editor("System.ComponentModel.Design.MultilineStringEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
    GetType(UITypeEditor))>
    Public Property OverviewText As String
        Get
            Return OverviewDescriptionUltraLabel.Text
        End Get
        Set(value As String)
            OverviewDescriptionUltraLabel.Text = value
        End Set
    End Property

But I'm not sure if I can do that with IG controls?  What I'm trying to do is similar to this http://community.infragistics.com/forums/t/58300.aspx, but simply exposing the property as per that code (assuming I understood it correctly) didn't work - maybe because UltraFormattedLabel's Value property is of type Object?

Anyway, any help much appreciated.

 

 

 

  • 469350
    Verified Answer
    Offline posted

    Hi Tom,

    In order to do this, you have to assign a UITypeEditor and possibly a TypeConverter to this property. The UITypeEditor that the control uses on your machine is defined in the Infragistics.Win.Design assembly, which is installed with NetAdvantage, and cannot be distributed to your users. It requires a design-time license for NetAdvantage. So what you are trying to do will only work if the people who are using your user control also own a license for NetAdvantage. Otherwise, you would be violating your license agreement.

    So you need to add an Editor attribute which points to the UITypeEditor. We use a TypeConverter attribute to the user can type in a string, but I don't know if that's neccessary in your case since you are already using a string type. The Editor attribute has to point to:

    Infragistics.Win.FormattedLinkLabel.Design.FormattedTextUITypeEditor