Using MEF to build a tabbed application dynamically
Posted
by Mmarquee
on Stack Overflow
See other posts from Stack Overflow
or by Mmarquee
Published on 2010-06-12T22:56:08Z
Indexed on
2010/06/12
23:02 UTC
Read the original article
Hit count: 289
I'm rather taken with MEF and plan to use it to build a demo application to load different tabs. I am a begineer at MEF and WPF and although MEF is loading the assemblies I'm stuck at loading the controls into the TabItem I have created. My code looks a bt like this ..
foreach (var page in pages)
{
TabItem item = new TabItem();
item.Header = page.PageTitle;
/// Errm???
// Add each page
tcPageControl.Items.Add(item);
}
The tabs are Pages, so I might be doing it totally wrong, and any help would be appreciated.
Thanks in advance
© Stack Overflow or respective owner