Click here to Skip to main content
15,904,655 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: XAML with a browser Pin
CodingLover4-Apr-11 23:16
CodingLover4-Apr-11 23:16 
GeneralRe: XAML with a browser Pin
Pete O'Hanlon4-Apr-11 23:18
mvePete O'Hanlon4-Apr-11 23:18 
GeneralRe: XAML with a browser Pin
CodingLover5-Apr-11 18:02
CodingLover5-Apr-11 18:02 
GeneralRe: XAML with a browser Pin
Pete O'Hanlon5-Apr-11 22:13
mvePete O'Hanlon5-Apr-11 22:13 
QuestionHow To Style This Button Pin
Kevin Marois4-Apr-11 5:48
professionalKevin Marois4-Apr-11 5:48 
AnswerRe: How To Style This Button Pin
SledgeHammer014-Apr-11 6:43
SledgeHammer014-Apr-11 6:43 
GeneralRe: How To Style This Button Pin
Kevin Marois4-Apr-11 6:58
professionalKevin Marois4-Apr-11 6:58 
GeneralRe: How To Style This Button [modified] Pin
SledgeHammer014-Apr-11 7:08
SledgeHammer014-Apr-11 7:08 
This is assuming the stock Expression Blend window layout.

1) create a new project in Expression Blend
2) click on the assets tab in the upper left
3) select the controls folder (2nd item down in the left list)
4) drag a button onto the form (3rd item down in the right list)
5) in the bottom left window (Objects and Timelines), right click on the button and select Edit Template | Edit a Copy
6) Hit OK in the dialog
7) now your objects and Tiemlines window should say Template as the root item in the tree
8) right click on Template and select View XAML

The XAML will have the complete style for the stock WPF button control.

* <Style x:Key="ButtonFocusVisual"> is responsible for drawing the dashed line
* there are a few brushes defined
* <Style x:Key="ButtonStyle1" TargetType="{x:Type Button}"> is your main button style

Give that a look, if you know XAML already, it should be pretty easy to understand. You would just get rid of most of the look and feel and leave the content presenter, or maybe change that into a textblock and add an image.

Now, Aero buttons use the RenderXXX DPs to do some of the drawing, so you need to get rid of those... RenderMouseOver, RenderPressed, RenderDefaulted, etc. and move those into the Trigger section so you can customize it.



-- Modified Monday, April 4, 2011 2:57 PM
GeneralRe: How To Style This Button Pin
SledgeHammer014-Apr-11 7:15
SledgeHammer014-Apr-11 7:15 
GeneralRe: How To Style This Button Pin
Kevin Marois4-Apr-11 7:18
professionalKevin Marois4-Apr-11 7:18 
GeneralRe: How To Style This Button [modified] Pin
Kevin Marois4-Apr-11 10:25
professionalKevin Marois4-Apr-11 10:25 
GeneralRe: How To Style This Button [modified] Pin
SledgeHammer014-Apr-11 11:08
SledgeHammer014-Apr-11 11:08 
GeneralRe: How To Style This Button Pin
SledgeHammer014-Apr-11 11:12
SledgeHammer014-Apr-11 11:12 
AnswerRe: How To Style This Button Pin
Abhinav S4-Apr-11 21:13
Abhinav S4-Apr-11 21:13 
QuestionWebBrowser Control not displaying Pin
Grimes3-Apr-11 12:03
Grimes3-Apr-11 12:03 
AnswerRe: WebBrowser Control not displaying Pin
Grimes4-Apr-11 13:25
Grimes4-Apr-11 13:25 
QuestionHow to use ListView.SelectedItems in MVVM? Pin
SledgeHammer012-Apr-11 9:58
SledgeHammer012-Apr-11 9:58 
AnswerRe: How to use ListView.SelectedItems in MVVM? Pin
Mycroft Holmes2-Apr-11 12:48
professionalMycroft Holmes2-Apr-11 12:48 
AnswerRe: How to use ListView.SelectedItems in MVVM? Pin
Abhinav S3-Apr-11 6:29
Abhinav S3-Apr-11 6:29 
GeneralRe: How to use ListView.SelectedItems in MVVM? Pin
Kevin Marois4-Apr-11 9:55
professionalKevin Marois4-Apr-11 9:55 
GeneralRe: How to use ListView.SelectedItems in MVVM? Pin
SledgeHammer014-Apr-11 10:09
SledgeHammer014-Apr-11 10:09 
GeneralRe: How to use ListView.SelectedItems in MVVM? Pin
Kevin Marois4-Apr-11 10:26
professionalKevin Marois4-Apr-11 10:26 
GeneralRe: How to use ListView.SelectedItems in MVVM? Pin
Abhinav S4-Apr-11 21:12
Abhinav S4-Apr-11 21:12 
QuestionBing map control in a WPF application Pin
Jack_Sparow1-Apr-11 8:01
Jack_Sparow1-Apr-11 8:01 
AnswerRe: Bing map control in a WPF application Pin
Abhinav S1-Apr-11 20:53
Abhinav S1-Apr-11 20:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.