XAML (Probably DockPane1.xaml)
<UserControl ..../>
<UserControl.Resources>
<Grid x:Name="YourGridName>
<!--All your controls here that will be blocked during long process-->
</Grid>
//C# (Probably Dockpane1.xaml.cs)
private void LongProcessEventTriggered(object sender, EventArgs e)
{
QueuedTask.Run(() =>
{
Dispatcher.Invoke(() =>
{
YourGridName.IsEnabled = false;
});
Do your stuff
Dispatcher.Invoke(() =>
{
YourGridName.IsEnabled = true;
});
}
}
This is not proper MVVM but functions the same way
if you bind your grid/stackpanel etc. you probably wouldn't need dispatcher