This project is read-only.

Cannot use frame within DocumentContent...behaves unexpectedly

Aug 14, 2009 at 2:27 PM

Hi Ado,

It appears a frame container cannot be used within a DocumentContent.

My goal is to use an empty container so that I may assign the source (Window) dynamically in code.
Can you suggest how this might be achieved? Can you suggest another container that will allow this?

Many thanks,
ADH

Aug 14, 2009 at 4:00 PM

On further investigation, the problem appears to be related to the frame itself, not AvalonDock. Sorry my misunderstanding.
For some reason assigning the Frame source in code doesn't instantiate the XAML page, like only makes a reference to the XAML type.

I can't figure this out so I'm resorting to creating/instantiating the XAML Page myself and calling Frame.Navigate with the instantiated object as the parameter.
It's odd because setting the source in XAML does instantiate the page object.