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 591087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:35:52+00:00 2026-05-13T15:35:52+00:00

I have a bunch of Button s in my application which look almost the

  • 0

I have a bunch of Buttons in my application which look almost the same. The only difference between them is the path data that they use.

This is the style I have for the “minimize button” of my application:

<Style x:Key="MinimizeButton" TargetType="{x:Type Button}">
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="{x:Type Button}">
                <!-- The border is here to make the entire "block" clickable.
                     Without it, only the actual path is clickable. -->
                <Border Background="Transparent">
                    <Path Name="ThePath" Data="{StaticResource MinimizeIconPath}" Style="{StaticResource WindowButtonPath}"/>
                </Border>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

As you can see, I’m basically just changing the control template to use a path instead of the default button stuff. But this declaration is only for the minimize button – I have a few other buttons, such as “maximize”, “restore” and “close” to deal with now. The problem is that the styles for those buttons will be identical, with the only difference being the Data attribute of their Paths.

What would you recommend me to do to use as little code as possible?

  • 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-05-13T15:35:53+00:00Added an answer on May 13, 2026 at 3:35 pm

    User control?

    http://www.codeguru.com/cpp/data/data-misc/xml/article.php/c12521/

    http://www.codeproject.com/KB/WPF/XSButton.aspx

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

Sidebar

Related Questions

i have a table which contains a bunch of dynamically created radio button lists,
I have a main menu activity with a bunch of buttons. One button starts
I have a bunch of buttons that have a tapGestureRecognizer linked to them, and
I'm trying to have a page with a bunch of buttons, each of which
I have a windows form application which is writing bunch of stuff in the
In my GWT application, I have a button to which I've attached a click
I have a windows form application which consists of a bunch of controls, but
I have a bunch of textboxes on a page and a submit button. I
So I have a bunch of buttons on a page, interspersed with other HTML,
I have a whole bunch of buttons that all need to have both a

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.