Click here to Skip to main content

Silverlight / WPF

 
AnswerRe: WPF tutorial book website pdf PinmemberFernando E. Braz2-Jan-13 6:15 
GeneralRe: WPF tutorial book website pdf Pinmemberfrazzle-me2-Jan-13 8:07 
QuestionWPF Tab Styling Question #2 PinmemberKevin Marois1-Jan-13 9:59 
AnswerRe: WPF Tab Styling Question #2 PinprotectorPete O'Hanlon1-Jan-13 10:48 
GeneralRe: WPF Tab Styling Question #2 PinmemberKevin Marois1-Jan-13 10:55 
GeneralRe: WPF Tab Styling Question #2 PinprotectorPete O'Hanlon1-Jan-13 10:56 
GeneralRe: WPF Tab Styling Question #2 PinmemberKevin Marois1-Jan-13 11:06 
GeneralRe: WPF Tab Styling Question #2 PinmentorWayne Gaylard2-Jan-13 0: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 PinprotectorPete O'Hanlon2-Jan-13 0:08 
GeneralRe: WPF Tab Styling Question #2 PinmemberKevin Marois2-Jan-13 16:41 
GeneralRe: WPF Tab Styling Question #2 PinprotectorPete O'Hanlon2-Jan-13 22:05 
GeneralRe: WPF Tab Styling Question #2 PinmemberKevin Marois2-Jan-13 22:40 
QuestionWPF TabItem Styling Question PinmemberKevin Marois30-Dec-12 12:16 
AnswerRe: WPF TabItem Styling Question PinprotectorPete O'Hanlon30-Dec-12 12:40 
GeneralRe: WPF TabItem Styling Question PinmemberKevin Marois30-Dec-12 16:16 
QuestionList Item Fore & Back Colors PinmemberKevin Marois29-Dec-12 8:52 
QuestionMVVM:How to bind the MenuItem Command of ListBoxItem ContextMenu dynamically? PinmemberMember 137073829-Dec-12 2:58 
AnswerRe: MVVM:How to bind the MenuItem Command of ListBoxItem ContextMenu dynamically? PinmemberSledgeHammer0129-Dec-12 8:22 
GeneralRe: MVVM:How to bind the MenuItem Command of ListBoxItem ContextMenu dynamically? PinmemberMember 137073829-Dec-12 16:44 
GeneralRe: MVVM:How to bind the MenuItem Command of ListBoxItem ContextMenu dynamically? PinmemberSledgeHammer0129-Dec-12 17:26 
GeneralRe: MVVM:How to bind the MenuItem Command of ListBoxItem ContextMenu dynamically? PinmemberMember 137073829-Dec-12 18:00 
GeneralRe: MVVM:How to bind the MenuItem Command of ListBoxItem ContextMenu dynamically? PinmemberSledgeHammer0129-Dec-12 18:25 
GeneralRe: MVVM:How to bind the MenuItem Command of ListBoxItem ContextMenu dynamically? PinmemberMember 137073829-Dec-12 20:02 
Questionmm PinmemberAishwarya aishu28-Dec-12 1:44 
AnswerRe: mm PinmvpRichard MacCutchan28-Dec-12 6:59 

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

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


Advertise | Privacy | Mobile
Web01 | 2.8.150123.1 | Last Updated 23 Jan 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid