I have Request.xaml
with button and with many comboxes, so I want reload it and put combox values to put it to default after button click. Of course I do some more staff.
My Request.xaml
code has such parts of the code:
<TextBox x:Name="TxtBlock_numRequest" TextWrapping="Wrap" Height="23"/>
<ComboBox x:Name="CmbBox_lvlPriority" Width="160">
<ComboBoxItem Content="1" Name="High" />
<ComboBoxItem Content="2" Name="Medium" />
<ComboBoxItem Content="3" Name="Low" />
</ComboBox>
In addition, xaml code such event <Button Content="Next request" Width="160" VerticalAlignment="Bottom" Background="#FF339933" Click="Button_Click" />
And Request.xaml.cs
file have just private void Button_Click(object sender, RoutedEventArgs e)
function.
I display Request.xaml
this way: first of all, MainWindow.xaml
displays MainPage.xaml
,
<mui:Link DisplayName="Generation" Source="/Pages/MainPage.xaml" />
,
and finally MainPage.xaml
dispays Request.xaml
`
Is it possible to reset the whole page, because I need to give user opportunity to add new request's parameters to existing parameters, which eventually will be located in a .xml
file?
May be it is possible to realize via OnNavigatedTo Method or by UIElement.InvalidateVisual Method (http://msdn.microsoft.com/en-us/library/system.windows.uielement.invalidatevisual.aspx)