开发者

Is there a way to include XAML files in another XAML file?

I want to crea开发者_高级运维te a master XAML file which includes a bunch of other XAML files. Is this possible?


In your main Xaml, use a ItemsControl balise and for the Xaml composant, you must define your project with UserControl in place of Window

<ItemsControl x:Name="Plugins" x:FieldModifier="private" Height="auto">

In your code, you just need to write this:

Plugins.Items.Add(UserControl);

Maybe you can learn something about MEF for the loading of all yours Xaml

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜