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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T07:43:36+00:00 2026-05-21T07:43:36+00:00

I have two ToolBar s side by side (I had to do that so

  • 0

I have two ToolBars side by side (I had to do that so I could align buttons right and left)
But now, I have to add some text that can be aligned right left or center between both toolbars. I added the text in a TextBlock inside a StackPanel disposed on a Grid at the second position (between the toolbars) and, of course, it created a gap between both toolbars (A stackPanel doesn’t have the same style as a toolbar, of course).

I would like to replicate the toolbar LinearGradientBrush on my stackpanel so it looks the same as my toolbar does. the point is to make the thing look like ONE toolbar.

Is there a way to get the ToolBar Style or to recreate it with a LinearGradientBrush definition, and if so, how?

  • 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-21T07:43:37+00:00Added an answer on May 21, 2026 at 7:43 am

    Here’s one way you could do it. Say one of your toolbars’ name is “toolBar.” Bind the Background property on the StackPanel to the Background property on the ToolBar as such:

    <StackPanel Background="{Binding Path=Background, ElementName=toolBar}" />
    

    Hope that helps! 🙂

    EDIT:

    You can check out the control template for the ToolBar here.

    The LinearGradientBrush used looks as such:

    <LinearGradientBrush x:Key="DarkBrush" StartPoint="0,0" EndPoint="0,1">
      <GradientBrush.GradientStops>
        <GradientStopCollection>
          <GradientStop Color="#FFF" Offset="0.0"/>
          <GradientStop Color="#AAA" Offset="1.0"/>
        </GradientStopCollection>
      </GradientBrush.GradientStops>
    </LinearGradientBrush>
    

    In the event you just wanted to use this instead of binding. 🙂

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

Sidebar

Related Questions

I have an interface that has two toolbars, one attached to the frame and
Have two actionsheet buttons and one modalviewcontroller on mainviewcontroller in application. Now for two
I have a jQuery UI Button that I'm placing in a jqGrid toolbar but
I would like to add a gap between two buttons on an Eclipse toolbar.
I have a UINavigationController. In its toolbar is a segmented control with two buttons.
I have a UIScrollView that contains a UIToolbar, but when I scroll, the toolbar
I have an existing toolbar and would like to add tabs to it that
Dear all I have implemented two buttons in the navigation bar on the right
I have a VBA toolbar that i have been working on. It has two
I have two separate views that both show multiple lists of values. Both views

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.