0

I'm reading about the WPF Navigation Services and I have a general question.

At run-time I want to be able to parse an external XML file that has information about an UI (i.e. a series of screens) and then in the code-behind create a WPF Navigation service with multiple Pages. Is it possible to create a new WPF Page at run-time or do they have to be created in Visual Studio first?

Thanks Mike

H.B.
  • 166,899
  • 29
  • 327
  • 400
zzMzz
  • 467
  • 1
  • 5
  • 21

1 Answers1

0

You can create a new page in the code behind. All you need is a frame to add it to

Page page = new Page();
MainFrame.Navigate(page); // MainFrame is the x:Name of the Frame within XAML
MyKuLLSKI
  • 5,285
  • 3
  • 20
  • 39