I have two user controls which needs to be loaded dynamically based on a property in the database.
I am modifying an existing XAML page. The page contains the following line
<wcontrols:page1 x:Name="page1" Width="674" Height="372.215"Canvas.Left="57" Canvas. Top="215.785" Loaded="page1_Loaded_1" />
I want to switch between page1 with page2 dynamically. Should i need to move the code into the code-behind file or is there any way to do that within the XAML file?
Define a style for the control and put in it a DataTrigger that set the page 2 at the change of a property of the viewmodel