Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

Using the BorderThickness property within a button

Closed Thread
 
Thread Tools Display Modes
Old 06-15-2006   #1 (permalink)
Newbie


  weldej1 is offline

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.
Old 06-16-2006   #2 (permalink)
Drew Marsh
Guest


 

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/


Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use my custom TypeDescriptor to obtains default Value on property inXAML Property Editor of Visual Studio 2008 azerty Avalon 0 04-14-2008 06:14 AM
disable lock button beside power button? george1 Vista General 2 06-12-2007 03:18 PM
use the Sleep button as a shutdown button podger Vista General 4 05-09-2007 03:52 AM
Set BorderThickness.Top Property in Trigger with TemplateBinding Thomas Mueller Avalon 1 05-31-2006 08:26 AM
Split button and/or menu button Soeren D. Avalon 0 02-02-2006 12:50 PM








Vistax64.com 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 2005-2008

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 47 48 49 50