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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:05:40+00:00 2026-06-11T12:05:40+00:00

I have a WPF Tab Control. Inside of it is a Listbox filled with

  • 0

I have a WPF Tab Control. Inside of it is a Listbox filled with some items. (There is only one item represented in the picture):

unselected item

The item has an orange gradient.

And here is the same item once I select it with the mouse:

unselected item

My area of interest is the little left side sliver of Blue coloring that I have circled in red. I realize that this is the product of me selecting the item, and it shades the entire item blue to signify this. However you will notice that this sliver of blue is not located in any of the edges except the left side.

My question is this: How can I stretch the left side of my listbox item such that this blue sliver is gone, and the orange from the listbox item fills that area? I have played with margins and padding on everything I can think of, but to no avail.

Any hints, comments, and suggestions are much appreciated! 🙂

EDIT: As requested, the Xaml for the ItemTemplate.

The ItemTemplate uses a DataTemplate that is a static Resource. The DataTemplate looks like this:

    <DataTemplate x:Key="MyDataTemplate">
        <UserControl MouseDoubleClick="MouseDoubleClick_Event">
            <DockPanel Background="<the orange gradient>" LastChildFill="True">
                <Image Name="AnImage" Height="20" Width="20" Source=" Binding Path=ImagePath}"/>
                <Label Width="Auto">
                    <TextBlock Text="{Binding Path=TheName}" />
                </Label>
            </DockPanel>
        </UserControl>
    </DataTemplate>
  • 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-11T12:05:41+00:00Added an answer on June 11, 2026 at 12:05 pm

    I have found a solution to this. If I simply set a negative left margin on my ListBox, it moves the ListBoxItems over that amount and the sliver disappears. Thanks to everyone for your interest!

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

Sidebar

Related Questions

I have a tab control in my WPF application with multiple tabs. Each tab
How can I add WPF form into tab item of tab control? like I
I have a WPF Menu and a Tab control. I would like the list
I have idea to implement my wpf windows like TabPages in tab control. It
I have a WPF Popup control with a ListBox and a Button in it.
I have a WPF UserControl with Focusable=True. It's the only focusable control in the
I would like to extend the tab control to have closeable tab items. I
I have a WPF window with a tab control, and I'm defining the TabItems
hopefully some WPF ninja can explain to me why if I have a tab
I have a WPF tab control. but I would like to change the tab

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.