1. Welcome Guest! In order to create a new topic or reply to an existing one, you must register first. It is easy and free. Click here to sign up now!.
    Dismiss Notice

WPF/C# inherit style

Discussion in 'Microsoft News' started by NewsBot, Apr 10, 2008.

  1. NewsBot

    NewsBot I Got News

    Joined:
    Feb 8, 2006
    Messages:
    1,813
    Operating System:
    Windows Vista Home Premium
    Hello you all,

    I would like to create a special button that inherit from Button in c#. This button has a special behavior, that's why I just can't apply a template on it.

    So, I created my SpecialButton class, wrote the code and inserted it in my window... Doing this, I expected that the SpecialButton will adopt its "mother" 's style. But the SpecialButton does not want to hear anything it does not inherit its mother style.

    I believe that it is due to the fact that I defined a style for {x:Type Button}.

    How can I say to my special button that for the style he IS a Button???
    I hope that my explanations are clear enough:s.

    Thanks.

    N3mr0d




     

Share This Page