Locating DataContext Of Infragistics WPF ContentPane from the ContentPaneTabHeader

Dammit, I forgot the juicy parts of how I went about resolving this particular Jouney Of Pain, but the answer is: to locate the DataContext of the ContentPane from the ContentPane TabHeader you must navigate to the PaneTabItem and descend through two DataContexts.

Here’s one of me doing the above, Binding the Fill Property of a Rectangle to a Property on the ContentPane. (Yes, this does assist World Peace).

Fill="{Binding Path=DataContext.DataContext.whatever,
RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type igDock:PaneTabItem}}}"

Advertisements

Tags: , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: