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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:52:06+00:00 2026-05-31T10:52:06+00:00

I am modifying the button visual appearance in my XAML code with a hexagon.

  • 0

I am modifying the button visual appearance in my XAML code with a hexagon. Now, I want to add 2 lines to the two outer edges of the hexagon like the image below:

https://skydrive.live.com/redir.aspx?cid=204df65b0e6e1655&resid=204DF65B0E6E1655!117&parid=204DF65B0E6E1655!107&authkey=!AEzKZRmwMNhBWxM

Can anyone tell how and where to add it ? My code is something like this

    <Page.Resources>
    <Style TargetType="Button">   
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Canvas>
                        <Polygon Canvas.Top="30"  Points=
                     "430,0 
                     400,32
                     -30,32
                     -60,0
                     -30,-32
                     400,-32"
             Stroke="Brown" StrokeThickness="10"/>
                        <ContentPresenter Canvas.Left="80" Foreground="White" FontSize="40"></ContentPresenter>
                    </Canvas>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</Page.Resources>

<Grid Background="Black">
    <Grid.RowDefinitions>
        <RowDefinition />
        <RowDefinition />
        <RowDefinition />
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
        <ColumnDefinition />
    </Grid.ColumnDefinitions>

    <Button Grid.Row="1" Margin="40,-100 0,-50" HorizontalAlignment="Center">Hello World</Button>    

</Grid>

I cant get the line to connect to those edges and spread all the way to the page end.
Any idea ?

  • 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-31T10:52:07+00:00Added an answer on May 31, 2026 at 10:52 am

    Do you want this within your button style? I was able to achieve this through the XAML button control template code below.

    I put separators in a grid and then put rectangles on top them to add stroke to the image.
    I also added an upper margin of 2 onto the polygon to align with the rectangles.

    <ControlTemplate TargetType="Button">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition/>
                                <ColumnDefinition Width="500"/>
                                <ColumnDefinition />
                            </Grid.ColumnDefinitions>
                            <Rectangle Fill="White" Grid.Column="0"/>
                            <Rectangle Fill="White" Grid.Column="2"/>
                             <Separator Background="White" Grid.Column="0"/>
                            <Separator Background="White" Grid.Column="2"/>
                            <Canvas Grid.Column="1" Margin="64,2,0,0">
                                <Polygon Points=
                     "430,0 
                     400,32
                     -30,32
                     -60,0
                     -30,-32
                     400,-32"
             Stroke="Brown" StrokeThickness="10"/>
                              <ContentPresenter Canvas.Left="80" Foreground="White" FontSize="40"/>
    
                            </Canvas>
                        </Grid>
                    </ControlTemplate>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am modifying my PHP network's code to have user roles like wordpress here
I've got code like the following: private void SetupCheeseShop(Button buyCheese, Button spoilCheese) { var
I'm working on modifying some existing code for a payment gateway and I'm not
I'm modifying some code that calls enumerate on a list declared via a list
I want to have the default shape of the back button, but that makes
I've been modifying a screen in my app and added a disclosure button and
I'm modifying a Flask MiniTwit example to implement a twitter-like message reply system, where
I want to load a view dynamically on click of a button. Lets say
As part of modifying the GLPaint , I am trying to add erase functionality
I'm working on making a plugin for Mail.app. I'd like the plugin to add

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.