A: 

I used http://msdn.microsoft.com/en-us/library/default.aspx?q=smart+tag+windows+forms+designer.

As a result, I found Walkthrough: Adding Smart Tags to a Windows Forms Component.

I'm sure you're capable of doing the same search, and finding the same article. Why didn't you do the same search?

John Saunders
Oh, come on! Are the downvotes for suggesting he spend the same two minutes that I did?
John Saunders
-1 Very not helpful and condescending.
Pwninstein
Yes. Think about it from the asker's point of view - there's *way* more value in spending 30 seconds putting a question in front of thousands of experts than 2 minutes that may or may not yield any help at all. It's what we're here for. Rudeness detracts from an otherwise helpful answer.
Rex M
@Rex M: +1, well said.
Pwninstein
How is it not helpful? It's the walkthrough. Should someone repeat the walkthrough here on SO? And, I don't think it can be condescension to assume the OP is capable of doing a search - and then showing him which search terms I used. Condescending would be if this had been some complex search that I thought he was too dumb to do on his own.
John Saunders
@John I don't necessarily agree that it is condescending, but it is rude. Your answer implies SO should be a last resort after personal searches fail. There's no reason for that. It's perfectly fine for SO to be the first place people turn for programming questions. We only expect users to make a reasonable effort not to post duplicate questions, nothing else.
Rex M
@Rex: that is a false economy that will lead to a stratified developer community. There will be those who know, and those who ask. That's not healthy. Note, BTW it didn't take an expert to spend the two minutes to do that search! If the OP had been unaware of MSDN searches, the fact that I posted the link taught him. If he had not been able to figure out which search terms to use (maybe he didn't try "designer"), I showed him which search terms to use. I'm trying to make him my _equal_, not to continue to be superior to him!
John Saunders
So you're saying, the answer to every question on SO should be "Go to Google, and type your question."? That's not what this site is about. Also, saying "I'm sure you're capable of..." in this community is immensely rude, and reeks of condescension, in my opinion.
Pwninstein
@Rex: **two minutes**! Yes, I think you should search for two minutes. Is everyone too busy to spend two minutes? If you take 30 seconds to ask a question like this, you're asking the "experts" to spend a lot more of our time than two minutes, free of charge.
John Saunders
@Pwninstein: there may be a language problem here. I was stating my sincere belief that the OP was, in fact, capable of doing the same search, and finding the same article. If I had been expressing uncertainty, I would have said, "I'm not sure you're capable" or something like that.
John Saunders
@John Just because it doesn't take an expert to do something doesn't mean you have to say "It doesn't take an expert to do this BTW" or some variation as part of your answer. That's rude. It implicitly tells the user s/he's using SO incorrectly and is wasting all our time by asking before searching MSDN. I bet if you cut the last two sentences from your answer, those two downvotes would turn into upvotes.
Rex M
@Pwninstein: it was also my understanding we want this site to be the site that appears when you search in Google for an answer to your question. It can't be that if nobody uses Google at all, and all we'll get is thousands of duplicates, and experts tired of answering the same questions, over and over.
John Saunders
@All: If you think I care about the number, then I've left the wrong impression. I wanted to know the reason for the downvotes, that's all. I actually think it's important, some times, to plant your feet and not be pushed any further in the wrong direction. If we "enable" developers to just come here and ask for some expert to do everything for them, then they will never become experts themselves. That's bad for them, and bad for us, and I'm not ready to stop trying to influence it.
John Saunders
@John: Stating your belief that the OP is capable of doing a Google or MSDN search is unnecessary, since he has proven his competence by posting a question here. Asking the question here, as @Rex mentioned, exposes it to experts who can give an answer that's possibly clearer than MSDN can give. Also, no language problem here; Native English speaker with 5 years of Classics.
Pwninstein
@John: If the question is a bad one, then by all means, flag it as a duplicate or vote to close it. I think it's a perfectly valid question, but, as always, the SO community will self-police (which is a good thing).
Pwninstein
@Pwninstein: what does an ability to search have to do with an ability to post? And you're being silly to think that the reason to post before searching is that MSDN _might_ not be clear! If it turns out not to be, then one can refer to the located article, and ask better, more detailed questions to get it cleared up. And I didn't mean you don't speak English! It's obvious you do. I mean I've stated something plainly, and you thought I must mean something else.
John Saunders
@Pwninstein: and you're way off. I think it's a perfectly good question, and that if he'd spent the two minutes, he'd have had his immediate answer, known where within MSDN to go for related answers, and would have been able to come back here to ask for clarifications, and for information that actually _does_ require an expert.
John Saunders
+1  A: 

Hello wael you can use this code to view sample tag in custom control

and you can get video about that from www.windowsclient.com


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.ComponentModel.Design;
namespace MakeSmartTag
{
public enum Languages
{
    English,
    Arabic,
    Japanese
}
[Designer(typeof(UserControlDesigner))]
public partial class UserControl2 : UserControl
{
    public UserControl2()
    {
        InitializeComponent();

    }
    private Languages _language;
    public Languages Language
    {
        get { return _language; }
        set
        {
            switch (value)
            {
                case Languages.Arabic:
                    {
                        label1.Text = "مرحباً";
                        _language = value;
                    }
                    break;
                case Languages.English:
                    { 
                        label1.Text = "Hello";
                        _language = value;
                    }
                    break;
                case Languages.Japanese:
                    {
                        label1.Text = "Conechoa";
                        _language = value;
                    }
                    break;
            }
        }
    }
}
public class UserControlDesigner : System.Windows.Forms.Design.ControlDesigner
{
    private DesignerActionListCollection lists;
    public override DesignerActionListCollection ActionLists
    {
        get
        {
            if (lists == null)
            {

                lists = new DesignerActionListCollection();
                lists.Add(new UserControlActioonList(this.Component));
            }
            return lists;
        }
    }
}

public class UserControlActioonList : DesignerActionList
{
    private UserControl2 myUserControl;
    private DesignerActionUIService designerActionSvc = null;
    public UserControlActioonList(IComponent component)
        : base(component)
    {
        this.myUserControl = (UserControl2)component;

        this.designerActionSvc = (DesignerActionUIService)GetService(typeof(DesignerActionUIService));
    }
    private PropertyDescriptor GetPropertyByName(string propName)
    {
        PropertyDescriptor prop = default(PropertyDescriptor);
        prop = TypeDescriptor.GetProperties(myUserControl)[propName];
        if (prop == null)
        {
            throw new ArgumentException("Invalid Property", propName);
        }
        else
        {
            return prop;
        }
    }
    public override System.ComponentModel.Design.DesignerActionItemCollection GetSortedActionItems()
    {
        DesignerActionItemCollection item = new DesignerActionItemCollection();
        item.Add(new DesignerActionHeaderItem("المظهر"));
        item.Add(new DesignerActionPropertyItem("BackColor", "لون الخلفية", "Appearance", "Set background Color of the control"));
        item.Add(new DesignerActionHeaderItem("تحديد اللغة"));
        item.Add(new DesignerActionPropertyItem("Language", "اللغة", "Functions", "Set the language of the control"));
        return item;
    }
    public Color BackColor
    {
        get { return this.myUserControl.BackColor; }
        set { GetPropertyByName("BackColor").SetValue(myUserControl, value); }
    }
    public Languages Language
    {
        get { return this.myUserControl.Language; }
        set { GetPropertyByName("Language").SetValue(myUserControl, value); }
    }
}

}

Belal mazlom