0

I have a wpf tab control which is highly customized through styles. I have referenced those styles in a resourcedictionary "TabControlResources". How do I reference "TabControlResources" in another resourcedictionary?. I have a resourcedictionary called "MainViewResources" and I would like to reference the tab style from my "TabControlResources" in that resourcedictionary.

Thanks in advance.

1 Answer 1

2
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="pack://application:,,,/path/to/TabControlResources.xaml" /> </ResourceDictionary.MergedDictionaries> <other stuff...> </ResourceDictionary> 
Sign up to request clarification or add additional context in comments.

1 Comment

Good answer, but you don't need the pack://application:,,,/ in the Source string. In fact, that particular prefix is always superfluous in any Application.LoadComponent context because it is added automatically whenever a relative path is passed.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.