views:

235

answers:

1

Hello everebody. I write simple xaml-file in notepad:

<FlowDocument AllowDrop="True" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"&gt;&lt;Paragraph /> <BlockUIContainer><Button Tag="another.xaml">Next...</Button> </BlockUIContainer></FlowDocument>

This file contains BlockUIContainer with Button inside. Button also has Tag-property which contains reference to another xaml-file. When i load my xaml-file to FlowDocumentScrollViewer I want to click the button and load another.xaml in same FlowDocumentScrollViewer. How can i do this ? I suspect that I need to search my button, but i don't know how.

Any ideas will be wonderfull. Thanks.

A: 

If you add a ContentControl to your XAML document, you can insert another control into the content. You can either bind the Content property of the ContentControl to another.xaml and set the ContentControl to be hidden by default, then make it visible in the Button OnClick event handler, or you can have the ContentControl visible all the time and just set its Content property in your Button OnClick event handler.

TabbyCool
I choose another way but THANKS for your reply Tabby- it's give me some more ideas.
Victor