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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T23:43:45+00:00 2026-05-12T23:43:45+00:00

I have created a static resource defining the border of a specific item in

  • 0

I have created a static resource defining the border of a specific item in my xaml, but I can’t find a good way to define a unique color for each side!

xaml:

<Border Style="{StaticResource SidePanelBorder}">
        <!-- rest of the xaml -->
</Border>

StaticResource:

<Style x:Key="SidePanelBorder">
    <Setter Property="Control.BorderBrush" Value="#FF363636" />
    <Setter Property="Control.BorderThickness" Value="1" />
</Style>

But I want to define one color for each side of the border, and eventually also a different Border thickness.

Any good techniques out there doing this?

  • 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-12T23:43:46+00:00Added an answer on May 12, 2026 at 11:43 pm

    Seems very hacky, but you could define borders within borders, and make only 1 side have a thickness. For example

    <Border BorderThickness="0,0,0,10" BorderBrush="Green">
        <Border BorderThickness="0,0,10,0" BorderBrush="Blue">
            <Grid>
                <Button>Hello</Button>
            </Grid>
        </Border>
    </Border>
    

    would give a green border on the bottom and a blue border to the right. Isn’t the prettiest piece of Xaml though.

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

Sidebar

Related Questions

I have created a static library following this link . But I am facing
I have created a public static class utils.cs I want to use it in
I have created a page with a static image positioned to the ride side
I have created my own Attached Property like this: public static class LabelExtension {
I have created a minidump using win32 api [DllImport(DbgHelp.dll, SetLastError = true)] private static
I have a static library *.lib created using MSVC on windows. The size of
I have a static table view, created using a storyboard. I want to get
I've created a website with ASP.NET MVC. I have a number of static pages
I have created a style for a listbox item which shows up the button.
I'm tryihg to bind a combobox item source to a static resource. I'm oversimplfying

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.