Click here to Skip to main content
15,867,568 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: WPF tutorial book website pdf Pin
Fernando E. Braz2-Jan-13 5:15
Fernando E. Braz2-Jan-13 5:15 
GeneralRe: WPF tutorial book website pdf Pin
David C# Hobbyist.2-Jan-13 7:07
professionalDavid C# Hobbyist.2-Jan-13 7:07 
QuestionWPF Tab Styling Question #2 Pin
Kevin Marois1-Jan-13 8:59
professionalKevin Marois1-Jan-13 8:59 
AnswerRe: WPF Tab Styling Question #2 Pin
Pete O'Hanlon1-Jan-13 9:48
subeditorPete O'Hanlon1-Jan-13 9:48 
GeneralRe: WPF Tab Styling Question #2 Pin
Kevin Marois1-Jan-13 9:55
professionalKevin Marois1-Jan-13 9:55 
GeneralRe: WPF Tab Styling Question #2 Pin
Pete O'Hanlon1-Jan-13 9:56
subeditorPete O'Hanlon1-Jan-13 9:56 
GeneralRe: WPF Tab Styling Question #2 Pin
Kevin Marois1-Jan-13 10:06
professionalKevin Marois1-Jan-13 10:06 
GeneralRe: WPF Tab Styling Question #2 Pin
Wayne Gaylard1-Jan-13 23:00
professionalWayne Gaylard1-Jan-13 23:00 
The AncestorType should be the bound to the control that is in turn bound to the VM. In most cases this is the Window/UserControl and not really the particular control in that Window, if you get what I mean.

Say you have a Window with it's DataContext set to the ViewModel that contains the CloseTabCommand, then you would do this
Command="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=CloseTabCommand}"
.
Hope this helps
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman

GeneralRe: WPF Tab Styling Question #2 Pin
Pete O'Hanlon1-Jan-13 23:08
subeditorPete O'Hanlon1-Jan-13 23:08 
GeneralRe: WPF Tab Styling Question #2 Pin
Kevin Marois2-Jan-13 15:41
professionalKevin Marois2-Jan-13 15:41 
GeneralRe: WPF Tab Styling Question #2 Pin
Pete O'Hanlon2-Jan-13 21:05
subeditorPete O'Hanlon2-Jan-13 21:05 
GeneralRe: WPF Tab Styling Question #2 Pin
Kevin Marois2-Jan-13 21:40
professionalKevin Marois2-Jan-13 21:40 
QuestionWPF TabItem Styling Question Pin
Kevin Marois30-Dec-12 11:16
professionalKevin Marois30-Dec-12 11:16 
AnswerRe: WPF TabItem Styling Question Pin
Pete O'Hanlon30-Dec-12 11:40
subeditorPete O'Hanlon30-Dec-12 11:40 
GeneralRe: WPF TabItem Styling Question Pin
Kevin Marois30-Dec-12 15:16
professionalKevin Marois30-Dec-12 15:16 
QuestionList Item Fore & Back Colors Pin
Kevin Marois29-Dec-12 7:52
professionalKevin Marois29-Dec-12 7:52 
QuestionMVVM:How to bind the MenuItem Command of ListBoxItem ContextMenu dynamically? Pin
Member 137073829-Dec-12 1:58
Member 137073829-Dec-12 1:58 
AnswerRe: MVVM:How to bind the MenuItem Command of ListBoxItem ContextMenu dynamically? Pin
SledgeHammer0129-Dec-12 7:22
SledgeHammer0129-Dec-12 7:22 
GeneralRe: MVVM:How to bind the MenuItem Command of ListBoxItem ContextMenu dynamically? Pin
Member 137073829-Dec-12 15:44
Member 137073829-Dec-12 15:44 
GeneralRe: MVVM:How to bind the MenuItem Command of ListBoxItem ContextMenu dynamically? Pin
SledgeHammer0129-Dec-12 16:26
SledgeHammer0129-Dec-12 16:26 
GeneralRe: MVVM:How to bind the MenuItem Command of ListBoxItem ContextMenu dynamically? Pin
Member 137073829-Dec-12 17:00
Member 137073829-Dec-12 17:00 
GeneralRe: MVVM:How to bind the MenuItem Command of ListBoxItem ContextMenu dynamically? Pin
SledgeHammer0129-Dec-12 17:25
SledgeHammer0129-Dec-12 17:25 
GeneralRe: MVVM:How to bind the MenuItem Command of ListBoxItem ContextMenu dynamically? Pin
Member 137073829-Dec-12 19:02
Member 137073829-Dec-12 19:02 
Questionmm Pin
Aishwarya aishu28-Dec-12 0:44
Aishwarya aishu28-Dec-12 0:44 
AnswerRe: mm Pin
Richard MacCutchan28-Dec-12 5:59
mveRichard MacCutchan28-Dec-12 5:59 

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.