How can I prevent SmartTag from showing?

Discussion in 'ASP .Net Building Controls' started by amanda, Feb 24, 2006.

  1. amanda

    amanda Guest

    Hi,

    I've a webcontrol which inherited from BaseValidator.
    Under the .Net 2.0, such control has a default function----SmartTag,
    which is new in 2.0.
    But I do not need it.
    How can I do ?
    My ValidatorDesigner is inherited from ControlDesinger.

    /// <summary>
    /// Summary description for ValidatorDesigner.
    /// </summary>
    internal class ValidatorDesigner:ControlDesigner
    {
    ...
    }

    I have returned a null to ActionList, but the smart Tag still can be
    seen.

    /// <summary>
    /// Gets the items that will populate smart tag menu.
    /// </summary>
    protected virtual BaseActionList ActionList
    {
    get
    {
    return null;
    }
    }

    Thanks for your answer.
     
    amanda, Feb 24, 2006
    #1
    1. Advertising

  2. amanda

    amanda Guest

    Have resolved.
    See codes below.

    /// <summary>
    /// Override the ActionLists to use pull model to populate
    smart tag menu.
    /// </summary>
    public override DesignerActionListCollection ActionLists
    {
    get
    {
    DesignerActionListCollection actionLists = new
    DesignerActionListCollection();
    actionLists.Add(new
    DesignerActionList(this.Component));

    return actionLists;
    }
    }
     
    amanda, Feb 24, 2006
    #2
    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. Replies:
    5
    Views:
    983
    Dave Pollum
    Mar 17, 2006
  2. Ray Booysen
    Replies:
    2
    Views:
    667
    Ray Booysen
    Mar 28, 2006
  3. Luc
    Replies:
    0
    Views:
    1,147
  4. Jeremy Tang

    Using UIEditor in a SmartTag

    Jeremy Tang, May 16, 2006, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    106
    Jeremy Tang
    May 16, 2006
  5. Burak
    Replies:
    1
    Views:
    106
    Scott Mitchell [MVP]
    May 18, 2004
Loading...

Share This Page