Is it possible to check which view is being used inside a region?
Is it possible to check which view is being used inside a region? I'm
using MVVM.
I got this code at the moment:
Application.Current.Dispatcher.InvokeAsync(() =>
{
var countactiveviews = RegionManager.Regions.First(x => x.Name
== "MainRegion").ActiveViews;
if (!countactiveviews.Any())
{
//// Show preview
var modulePreview = new Uri(_view.Replace("GridView",
"Preview"), UriKind.Relative);
RegionManager.RequestNavigate(Regions.PropertiesRegion,
modulePreview);
}
else
{
}
When _view is being used or open at the moment, then I want to execute
that code again.
So inside my else:
if(_view is being viewed) ...
Any ideas?
No comments:
Post a Comment