Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8826137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:03:43+00:00 2026-06-14T07:03:43+00:00

When I put button on a toolbar, its style changes automatically to match the

  • 0

When I put button on a toolbar, its style changes automatically to match the toolbar elements.

I derived my own class from a ToggleButton, and now if I instantiate one on the toolbar, it looks like ordinary button again. How can I access the built-in templates of the WPF, such that I don’t have to recreate the whole template from scratch?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T07:03:45+00:00Added an answer on June 14, 2026 at 7:03 am

    Apparently the ToolBar has resources defined for some controls including Button and ToggleButton. This styles, you cand find them in ToolBar’s metadata, are applied to each control of it’s target type. So you can get the style and apply it yourself:

        <ToolBar>
            <my:CustomToggleButton 
                Height="100" Width="100" 
                Style="{StaticResource {x:Static ToolBar.ToggleButtonStyleKey}}" 
                Content="Press me!" />
        </ToolBar>
    

    If you have a lot of button’s and don’t want to set the style for each one you could set the style in codebehind of your custom control.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my application, I have put a button that plays its own sound by
I'm trying to make a thumbnail toolbar button (TTB from now on)visible when the
I've been tried to put a button at my class at Jython. I'm using
I have put a button over a toolbar.But when i press that button,my selector
I'm making a toolbar using wxpython and I want to put the Quit button
I would like to put the Edit button in the toolbar at the bottom.
In WPF, if you put a Button inside a ToolBar, the button automagically gets
I want to get a extension, which can do, Put a button on toolbar,
I need to put a button in the bottom right of an otherwise empty
I want put a button on android edittextpreference. I create a custom editextpreference: public

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.