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

  • SEARCH
  • Home
  • 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 3232262
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:08:26+00:00 2026-05-17T17:08:26+00:00

I am in the process of designing a small WPF based application, and I’d

  • 0

I am in the process of designing a small WPF based application, and I’d like to define some frequently used vector icons in XAML in a form, that is usable in multiple controls on one view, and recolorable through binding.

For example, I’d like to a small cross icon change from black to gray together with the text in a disabled button, (i.e. being colured with the Foreground brush). The icon is set on the button by (ab)using the Tag property.

Currently, I am using DrawingBrushes, based on a GeometryBrush, that are then used to fill Rectangles, but here I see no way to share colors.

What way is there to achieve this effect (preferably elegent and easy)? =)

  • 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-17T17:08:26+00:00Added an answer on May 17, 2026 at 5:08 pm

    You can define the geometry of a path in a style (or alone as a geometry if you want) and reuse it as a staticresource

    <Style x:Key="PathStyle" TargetType="{x:Type Path}">
        <Setter Property="Data" Value="M0,0 L100,0 L100,100 L0,100Z" />
    </Style>
    

    Then just change the colors of the paths as you need to.

    <Path Style="{StaticResource PathStyle}" Stroke="Green" Fill="Blue" HorizontalAlignment="Left" />
    
    <Path Style="{StaticResource PathStyle}" Stroke="Purple" Fill="Orange" HorizontalAlignment="Right" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm in the process of designing a new database for an application. I'd like
I'm in the process of designing a small website and was curious when an
In the process of designing an application we've come to the conclusion that the
I am in a process of designing a custom SharePoint application. On a previous
I'm in a process of designing a multi-tier ASP.NET web application that is supposed
I'm in the process of designing my ASP.NET MVC application and I ran across
We are in the process of designing a tool to be used with HDEM(High
I'm designing a new web application and I'm aware that the process of registration
I'm in the process of designing a Java GUI driven application that runs a
I'm in the process of designing an Android application right now. I understand SQLite

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.