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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:03:39+00:00 2026-05-15T23:03:39+00:00

I created a Style template in Blend 4 for a button, but I’m not

  • 0

I created a Style template in Blend 4 for a button, but I’m not sure how to link the Label’s Content to the Button’s Content property.

Here’s the style XAML:

<Style x:Key="NavButton" TargetType="Button">
    <Setter Property="Background" Value="#FF1F3B53"/>
    <Setter Property="Foreground" Value="#FF000000"/>
    <Setter Property="Padding" Value="3"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="BorderBrush">
        <Setter.Value>
            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FFA3AEB9" Offset="0"/>
                <GradientStop Color="#FF8399A9" Offset="0.375"/>
                <GradientStop Color="#FF718597" Offset="0.375"/>
                <GradientStop Color="#FF617584" Offset="1"/>
            </LinearGradientBrush>
        </Setter.Value>
    </Setter>
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="Button">
                <Grid>
                    <VisualStateManager.VisualStateGroups>
                        <VisualStateGroup x:Name="CommonStates">
                            <VisualState x:Name="Disabled"/>
                            <VisualState x:Name="Normal"/>
                            <VisualState x:Name="MouseOver"/>
                            <VisualState x:Name="Pressed"/>
                        </VisualStateGroup>
                    </VisualStateManager.VisualStateGroups>
                    <Rectangle Stroke="#FF0E1AD2" RadiusY="7" RadiusX="7" StrokeThickness="4">
                        <Rectangle.Fill>
                            <LinearGradientBrush EndPoint="0.517,1.07" StartPoint="0.511,0.001">
                                <GradientStop Color="#FF1828AB" Offset="1"/>
                                <GradientStop Color="#FFFBDEDE"/>
                            </LinearGradientBrush>
                        </Rectangle.Fill>
                    </Rectangle>
                    <Rectangle Margin="15,6,11,15" RadiusY="7" RadiusX="7" Stroke="#FF0E11D2" StrokeThickness="0">
                        <Rectangle.Fill>
                            <SolidColorBrush Color="White" Opacity="0.3"/>
                        </Rectangle.Fill>
                    </Rectangle>
                    <sdk:Label Margin="8" RenderTransformOrigin="1.567,-0.25" HorizontalContentAlignment="Center" Content="Button"/>
                </Grid>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>
  • 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-15T23:03:40+00:00Added an answer on May 15, 2026 at 11:03 pm

    You use template bindings to bind controls inside a control template to properties of the control that they’re templating. For example:

    <Label Content="{TemplateBinding Content}"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created style for a toggle button, defined below: <Style TargetType={x:Type ToggleButton}> <Setter Property=Template>
I 've created a custom style for my Button, but it is no longer
I have created a button template consisting of a border and a content presenter.
I've created template for combobox but it has strange view, data is not displaying:
I created UserControl(Button) in Expression Blend XAML: <UserControl xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml xmlns:d=http://schemas.microsoft.com/expression/blend/2008 xmlns:mc=http://schemas.openxmlformats.org/markup-compatibility/2006 mc:Ignorable=d x:Class=Marica.FullClient.Graphics.Node
I have created a custom style and template for MenuItem and ContextMenu, and for
I have created a default style for a Button including a custom ControlTemplate like
When creating a control style & template in Blend for a WPF application, I
I've created an user control element which has a button with an individual style.
I have a metro style app created from a Visual Studio 11 template. I

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.