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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T19:07:26+00:00 2026-06-06T19:07:26+00:00

In order to show an object on a toolbox and allow user to drag/drop

  • 0

In order to show an object on a toolbox and allow user to drag/drop it on canvas I am using following control:

<HeaderedItemsControl x:Key="itemABC" 
                Width="100"
                Height="100"
                Canvas.Left="210"
                Canvas.Top="220"
                Margin="0,0,0,0"
                Style="{StaticResource ABC_Style}">

</HeaderedItemsControl>

and

In style have defined:

<Style x:Key="ABC_Style" TargetType="HeaderedItemsControl">
    <Setter Property="Data" Value="M10.395,0.5 L30.237,0.5 30.237,5.0359993 39.499999,5.0359993 39.499999,22.75 30.237,22.75 30.237,42.660999 39.499999,42.660999 39.499999,60.375 30.237,60.375 30.237,65 10.395,65 10.395,58.124999 0.5,58.124999 0.5,10 10.395,10 z"/>
</Style>

However, the problem is that HeaderdItemsControl has no Path attribute (as far as I know) so I’m wondering what other option I can have here.

In fact, I need to show a path inside a HeaderedItemsControl in XAML.

Thanks.

  • 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-06T19:07:27+00:00Added an answer on June 6, 2026 at 7:07 pm

    This example works:

    <Window x:Class="WpfApplication1.MainWindow"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            Title="MainWindow" Height="350" Width="525">
        <Window.Resources>
            <Style TargetType="HeaderedItemsControl">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type HeaderedItemsControl}">
                            <StackPanel>
                                <Grid>
                                    <Rectangle Fill="{TemplateBinding Background}"/>
                                    <ContentPresenter ContentSource="Header"/>
                                </Grid>
                                <Grid>
                                    <Rectangle Stroke="{TemplateBinding BorderBrush}"/>
                                    <ItemsPresenter Margin="2,0,0,0"/>
                                </Grid>
                            </StackPanel>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <PathGeometry x:Key="ABC_Style">
                M10.395,0.5 L30.237,0.5 30.237,5.0359993 39.499999,5.0359993 39.499999,22.75 30.237,22.75 30.237,42.660999 39.499999,42.660999 39.499999,60.375 30.237,60.375 30.237,65 10.395,65 10.395,58.124999 0.5,58.124999 0.5,10 10.395,10 z
            </PathGeometry>
        </Window.Resources>
        <Grid>
            <HeaderedItemsControl>
                <HeaderedItemsControl.Header>
                    <Path Stroke="Black" Data="{StaticResource ABC_Style}" />
                </HeaderedItemsControl.Header>
            </HeaderedItemsControl>
        </Grid>
    </Window>
    

    The default style for HeaderedItemsControl doesn’t normally actually include the header, for reasons beyond me. Also the way you were trying to set the header to be the path data you had wasn’t right, so I fixed it by defining the PathGeometry as a static resource and then including a Path using that as the Header.

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

Sidebar

Related Questions

In listening for key events in ActionBarSherlock in order to show the overflow menu
I am using simple order by clause to show products according to available quantity
I want to parse the below given data using resultsRequestSOAP object in order to
The following code is a what I have done in order to show a
In order to show the input field for a cc: adress I am trying
order by in query is taking to much time in MySQL. SHOW PROFILES shows
I created two arrays. First the arrays show the elements with no order whatsoever.
Order by descending is not working on LINQ to Entity In the following Query
Order props: Object selectedItems: Array[1] 0: SelectedItem length: 1 __proto__: Array[0] __proto__: Order I
Order deny,allow deny from all allow from xx.xx.x.xx RewriteRule . - [F] I have

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.