Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - Using the BorderThickness property within a button

 
 
Old 06-15-2006   #1 (permalink)


 
 

Using the BorderThickness property within a button

I am attempting with no luck to change the BorderThickness within a button. Is this not supported or is there a different way to do this. I am working with the Orcas Technology Preview (Cider) released in May 2006.
<
ButtonWidth="200"Height="50"BorderThickness="6"Content="Button5" />
It seems to work fine on a straight border such as:
<BorderBorderThickness="4"/>
Ultimately what I am attempting to do is to add a custom border to the button with an tiled image to give certain buttons a new look, while keeping others defaulted. Similiar to what a MatteBorder call gave me in Java.

My System SpecsSystem Spec
Old 06-16-2006   #2 (permalink)
Drew Marsh


 
 

Re: Using the BorderThickness property within a button

weldej1 wrote:

> I am attempting with no luck to change the BorderThickness within a
> button. Is this not supported or is there a different way to do this.
> I
> am working with the Orcas Technology Preview (Cider) released in May
> 2006.
> <Button Width=\"200\" Height=\"50\" BorderThickness=\"6\"
> Content=\"Button5\" />
> It seems to work fine on a straight border such as:
> <Border BorderThickness=\"4\"/>
> Ultimately what I am attempting to do is to add a custom border to the
> button with an tiled image to give certain buttons a new look, while
> keeping others defaulted. Similiar to what a MatteBorder call gave me
> in Java.


There are better ways to do this in WPF. As a matter of fact, have a look
at this post[1] in the forums that I responded to yesterday that shows you
some of the power WPF control templating provides. In your case, you need
to take what I did there to the next level by designing a re-usable Style
that you can then apply to the buttons which you want to have your custom
look and feel.

HTH,
Drew

[1] http://forums.microsoft.com/MSDN/Sho...78693&SiteID=1
___________________________________
Drew Marsh
Chief Software Architect
Mimeo.com, Inc. - http://www.mimeo.com
Microsoft C# / WPF MVP
Weblog - http://blog.hackedbrain.com/


My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Button Cotrol: Event, when mouse leaves button with mousebutten still down .NET General
Vista SP2: Stop button disabled when Send/Recv button pressed Vista mail
Set Focus To Specific Property In Property Grid .NET General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46