void IdentificationClick(DeviceLinkEventArgs evarg) {
			ReleaseViewModels(RegionNames.reg_property);

			ContentColumn column = new ContentColumn();
			ShowView(column, "IdentificationClick", RegionNames.reg_property);
			column.CreateBinding(ContentColumn.TitleProperty, LinkButtonsStrings.instance, x => x.identificationAndStatus);
			var ctx = CreateActivityContext(RegionNames.reg_property, evarg.session, column);

			var uri = evarg.session.deviceUri;
			ctx.RegisterInstance<Uri>(uri);

			Ctxdisp = ctx;

			UIdisp = IdentificationActivity
				.Run(ctx)
				.Subscribe(x => {
				}, err => {
					dbg.Error(err);
				});
		}
		void ReceiversClick(DeviceLinkEventArgs evarg) {
			ReleaseViewModels(RegionNames.reg_property);

			ContentColumn column = new ContentColumn();
			ShowView(column, "ReceiversClick", RegionNames.reg_property);

			column.CreateBinding(ContentColumn.TitleProperty, LocalTitles.instance, x => x.receivers);
			var ctx = CreateActivityContext(RegionNames.reg_property, evarg.session, column);

			var uri = evarg.session.deviceUri;
			ctx.RegisterInstance<Uri>(uri);

			Ctxdisp = ctx;

			//ReceiversView review = new ReceiversView();
			//review.Init(null);
			//ShowView(review, "receiver_view", RegionNames.reg_property);

			UIdisp = ReceiverManagementActivity
				.Run(ctx)
				.Subscribe(x => {
				}, err => {
					dbg.Error(err);
				});
		}
		void MetadataClick(MetadataEventArgs evarg) {
			ReleaseViewModels(RegionNames.reg_property);

			ContentColumn column = new ContentColumn();
			ShowView(column, "MetadataClick", RegionNames.reg_property);
			column.CreateBinding(ContentColumn.TitleProperty, LinkButtonsStrings.instance, x => x.metadata);
			var ctx = CreateActivityContext(RegionNames.reg_property, evarg.session, column);
			Ctxdisp = ctx;

			ctx.RegisterInstance<IVideoInfo>(evarg.videoInfo);
			ctx.RegisterInstance<Profile>(evarg.profile);
			ctx.RegisterInstance<INvtSession>(evarg.session);

			UIdisp = MetadataSettingsActivity
				.Run(ctx, evarg.profile)
				.Subscribe(x => {
					//eventAggregator.GetEvent<VideoChangedEvent>().Publish(evarg);
				}, err => {
					dbg.Error(err);
				});
		}
		void SequrityClick(DeviceLinkEventArgs evarg) {
			ReleaseViewModels(RegionNames.reg_property);

			ContentColumn column = new ContentColumn();
			ShowView(column, "CertificatesClick", RegionNames.reg_property);
			column.CreateBinding(ContentColumn.TitleProperty, LinkButtonsStrings.instance, x => x.sequrity);
			var ctx = CreateActivityContext(RegionNames.reg_property, evarg.session, column);
			Ctxdisp = ctx;

			UIdisp = CertificateManagementActivity
				.Run<IUnityContainer>(ctx)
				.Subscribe(x => {
				}, err => {
					dbg.Error(err);
				});
		}
		void ImagingClick(ChannelLinkEventArgs evarg) {
			ReleaseViewModels(RegionNames.reg_property);

			ContentColumn column = new ContentColumn();
			ShowView(column, "ImagingClick", RegionNames.reg_property);
			column.CreateBinding(ContentColumn.TitleProperty, LinkButtonsStrings.instance, x => x.sensorSettings);
			var ctx = CreateActivityContext(RegionNames.reg_property, evarg.session, column);
			Ctxdisp = ctx;

			ctx.RegisterInstance<IVideoInfo>(evarg.videoInfo);

			UIdisp = ImagingSettingsActivity
				.Run(ctx, evarg.profile.token)
				.Subscribe(x => {
					eventAggregator.GetEvent<VideoChangedEvent>().Publish(evarg);
				}, err => {
					dbg.Error(err);
				});
		}
		void VideoStreamingClick(ChannelLinkEventArgs evarg) {
			ReleaseViewModels(RegionNames.reg_property);

			ContentColumn column = new ContentColumn();
			ShowView(column, "VideoStreamingClick", RegionNames.reg_property);
			column.CreateBinding(ContentColumn.TitleProperty, LinkButtonsStrings.instance, x => x.videoStreaming);
			var ctx = CreateActivityContext(RegionNames.reg_property, evarg.session, column);
			Ctxdisp = ctx;

			ctx.RegisterInstance<IVideoInfo>(evarg.videoInfo);

			UIdisp = VideoSettingsActivity
						.Run(ctx, evarg.profile.token)
						.Subscribe(x => {
							eventAggregator.GetEvent<VideoChangedEvent>().Publish(evarg);
						}, err => {
							dbg.Error(err);
						});
			//subscriptions.Add(evarg.session.GetScopes()
			//    .ObserveOnCurrentDispatcher()
			//    .Subscribe(scopes => {
			//        var slist = (scopes == null ? Enumerable.Empty<string>() : scopes.Select(x => x.ScopeItem)).ToList();
			//        ScopesHolder sholder = new ScopesHolder(slist.ToArray());
			//        ctx.RegisterInstance<IScopesHolder>(sholder);
			//        UIdisp = VideoSettingsActivity
			//            .Run(ctx, evarg.profileToken)
			//            .Subscribe(x => {
			//                eventAggregator.GetEvent<VideoChangedEvent>().Publish(evarg);
			//            }, err => {
			//                dbg.Error(err);
			//            });
			//    }, err => {
			//        dbg.Error(err);
			//    }));
		}
		void PTZClick(ChannelLinkEventArgs evarg) {

			//Observable
			//    .Interval(TimeSpan.FromMilliseconds(800))
			//    .ObserveOnDispatcher()
			//    .Subscribe(l => {
			//        eventAggregator.GetEvent<VideoStreamingClick>().Publish(evarg);
			//    });

			//Observable
			//    .Interval(TimeSpan.FromMilliseconds(380))
			//    .ObserveOnDispatcher()
			//    .Subscribe(l => {
			//        eventAggregator.GetEvent<LiveVideoClick>().Publish(evarg);
			//    });

			//Observable
			//    .Interval(TimeSpan.FromMilliseconds(380))
			//    .ObserveOnDispatcher()
			//    .Subscribe(l => {
			//        var mevarg = new MetadataEventArgs();
			//        mevarg.currentAccount = evarg.currentAccount;
			//        mevarg.profile = 
			//        eventAggregator.GetEvent<MetadataClick>().Publish(evarg);
			//    });

			//Observable
			//    .Interval(TimeSpan.FromMilliseconds(50))
			//    .ObserveOnDispatcher()
			//    .Subscribe(l => {
			ReleaseViewModels(RegionNames.reg_property);

			ContentColumn column = new ContentColumn();
			ShowView(column, "PTZClick", RegionNames.reg_property);
			column.CreateBinding(ContentColumn.TitleProperty, LinkButtonsStrings.instance, x => x.ptz);
			var ctx = CreateActivityContext(RegionNames.reg_property, evarg.session, column);
			Ctxdisp = ctx;

			ctx.RegisterInstance<IVideoInfo>(evarg.videoInfo);

			PtzInfo ptzInfo = new PtzInfo() { ProfileToken = evarg.profile.token };
			ctx.RegisterInstance<IPtzInfo>(ptzInfo);

			UIdisp = PtzActivity
				.Run(ctx, evarg.profile.token)
				.Subscribe(x => {
				}, err => {
					dbg.Error(err);
				});
			//});

		}
		void NVAControlsClick(NVALinkEventArgs evarg) {
			ReleaseViewModels(RegionNames.reg_property);

			ContentColumn column = new ContentColumn();
			ShowView(column, "NVAControlsClick", RegionNames.reg_property);
			column.CreateBinding(ContentColumn.TitleProperty, LinkButtonsStrings.instance, x => x.nvaControls);
			var ctx = CreateActivityContext(RegionNames.reg_property, evarg.session, column);
			Ctxdisp = ctx;

			string token = null;
			if (evarg.control != null) {
				token = evarg.control.token;
			}

			UIdisp = NvaControlManagmentActivity
				.Run(ctx, evarg.engine, token)//evarg.controlToken)
				.ObserveOnCurrentDispatcher()
				.Subscribe(x => {
					if (x.IsSelect) {
						//var profTok = ((ProfileManagementActivityResult.Select)x).Item;
						//ProfileChangedEventArgs evargs = new ProfileChangedEventArgs(evarg.session, evarg.token, profTok);
						//eventAggregator.GetEvent<ProfileChangedPreviewEvent>().Publish(evargs);
						var controlTok = ((NvaControlManagmentActivityResult.Select)x).Item;
						ControlChangedEventArgs evargs = new ControlChangedEventArgs(evarg.session, evarg.engine, controlTok);
						eventAggregator.GetEvent<ControlChangedPreviewEvent>().Publish(evargs);
					} else if (x.IsRefresh) {
						//ProfileChangedEventArgs evargs = new ProfileChangedEventArgs(evarg.session, evarg.token, evarg.profileToken);
						//eventAggregator.GetEvent<ProfileChangedPreviewEvent>().Publish(evargs);
						ControlChangedEventArgs evargs = new ControlChangedEventArgs(evarg.session, evarg.engine, evarg.control.token);
						eventAggregator.GetEvent<ControlChangedPreviewEvent>().Publish(evargs);
					}
				}, err => {
					dbg.Error(err);
				});
		}
		void ProfilesClick(ChannelLinkEventArgs evarg) {
			ReleaseViewModels(RegionNames.reg_property);

			ContentColumn column = new ContentColumn();
			ShowView(column, "ProfilesClick", RegionNames.reg_property);
			column.CreateBinding(ContentColumn.TitleProperty, LinkButtonsStrings.instance, x => x.profileEditor);
			var ctx = CreateActivityContext(RegionNames.reg_property, evarg.session, column);
			Ctxdisp = ctx;

			UIdisp = ProfileManagementActivity
					 .Run(ctx, evarg.profile == null ? null : evarg.profile.token, evarg.token)
				.ObserveOnCurrentDispatcher()
				.Subscribe(x => {
					if (x.IsSelect) {
						var profTok = ((ProfileManagementActivityResult.Select)x).Item;
						ProfileChangedEventArgs evargs = new ProfileChangedEventArgs(evarg.session, evarg.token, profTok);
						eventAggregator.GetEvent<ProfileChangedPreviewEvent>().Publish(evargs);
					} else if (x.IsRefresh) {
						ProfileChangedEventArgs evargs = new ProfileChangedEventArgs(evarg.session, evarg.token, evarg.profile.token);
						eventAggregator.GetEvent<ProfileChangedPreviewEvent>().Publish(evargs);
					}
				}, err => {
					dbg.Error(err);
				});
		}
		void LiveVideoClick(ChannelLinkEventArgs evarg) {
			ReleaseViewModels(RegionNames.reg_property);

			ContentColumn column = new ContentColumn();
			ShowView(column, "LiveVideoClick", RegionNames.reg_property);
			column.CreateBinding(ContentColumn.TitleProperty, LinkButtonsStrings.instance, x => x.liveVideo);
			var ctx = CreateActivityContext(RegionNames.reg_property, evarg.session, column);

			StreamInfoHelper strinfo = new StreamInfoHelper();
			strinfo.streamInfo = () => {
				return Apm.Iterate(LoadStreamInfoNVT(evarg, strinfo));
			};
			ctx.RegisterInstance<IStreamInfoHelper>(strinfo);

			Ctxdisp = ctx;

			ctx.RegisterInstance<IVideoInfo>(evarg.videoInfo);

			string videoSourceToken = evarg.token;
			string profToken = evarg.profile.token;

			UIdisp = LiveVideoActivity
				.Run(ctx, profToken, videoSourceToken)
				.Subscribe(x => {
					eventAggregator.GetEvent<VideoChangedEvent>().Publish(evarg);
				}, err => {
					dbg.Error(err);
				});
		}
		void NVASettingsClick(NVALinkEventArgs evarg) {
			ReleaseViewModels(RegionNames.reg_property);

			ContentColumn column = new ContentColumn();
			ShowView(column, "NVASettingsClick", RegionNames.reg_property);
			column.CreateBinding(ContentColumn.TitleProperty, LinkButtonsStrings.instance, x => x.nvaSettings);
			var ctx = CreateActivityContext(RegionNames.reg_property, evarg.session, column);
			Ctxdisp = ctx;

			UIdisp = NvaSimpleConfigureInputsActivity
				.Run(ctx, evarg.control)
				.ObserveOnCurrentDispatcher()
				.Subscribe(x => {
				}, err => {
					dbg.Error(err);
				});
		}
		void NVAMetadataClick(NVALinkEventArgs evarg) {
			ReleaseViewModels(RegionNames.reg_property);

			ContentColumn column = new ContentColumn();
			ShowView(column, "MetadataClick", RegionNames.reg_property);
			column.CreateBinding(ContentColumn.TitleProperty, LinkButtonsStrings.instance, x => x.nvaMetadata);
			var ctx = CreateActivityContext(RegionNames.reg_property, evarg.session, column);

			StreamInfoHelper strinfo = new StreamInfoHelper();
			strinfo.streamInfo = () => {
				return Apm.Iterate(LoadStreamInfoNVA(evarg, strinfo));
			};
			ctx.RegisterInstance<IStreamInfoHelper>(strinfo);

			Ctxdisp = ctx;

			StreamSetup ssetup = new StreamSetup() {
				transport = new Transport() {
					protocol = AppDefaults.visualSettings.Transport_Type
				}
			};

			//EngineControlsView.Start(new EngineControlsView.Model(null, null), container, column);
			UIdisp = NvaMetadataSettingsActivity
				 .Run(ctx, evarg.control.token, evarg.control.engineConfigToken, ssetup)
				 .ObserveOnCurrentDispatcher()
				 .Subscribe(x => {
				 }, err => {
					 dbg.Error(err);
				 });
		}
		void NVAInputsClick(NVALinkEventArgs evarg) {
			ReleaseViewModels(RegionNames.reg_property);

			ContentColumn column = new ContentColumn();
			ShowView(column, "NVAInputsClick", RegionNames.reg_property);
			column.CreateBinding(ContentColumn.TitleProperty, LinkButtonsStrings.instance, x => x.nvaInputs);
			var ctx = CreateActivityContext(RegionNames.reg_property, evarg.session, column);
			Ctxdisp = ctx;

			EngineAnalyticsView.Start(container, column);
			//UIdisp = ProfileManagementActivity
			//    .Run(ctx, evarg.profileToken, evarg.token)
			//    .ObserveOnCurrentDispatcher()
			//    .Subscribe(x => {
			//        if (x.IsSelect) {
			//            var profTok = ((ProfileManagementActivityResult.Select)x).Item;
			//            ProfileChangedEventArgs evargs = new ProfileChangedEventArgs(evarg.session, evarg.token, profTok);
			//            eventAggregator.GetEvent<ProfileChangedPreviewEvent>().Publish(evargs);
			//        } else if (x.IsRefresh) {
			//            ProfileChangedEventArgs evargs = new ProfileChangedEventArgs(evarg.session, evarg.token, evarg.profileToken);
			//            eventAggregator.GetEvent<ProfileChangedPreviewEvent>().Publish(evargs);
			//        }
			//    }, err => {
			//        dbg.Error(err);
			//    });
		}
		void DateTimeClick(DeviceLinkEventArgs evarg) {
			ReleaseViewModels(RegionNames.reg_property);

			ContentColumn column = new ContentColumn();
			ShowView(column, "DateTimeClick", RegionNames.reg_property);
			column.CreateBinding(ContentColumn.TitleProperty, LinkButtonsStrings.instance, x => x.timesettings);
			var ctx = CreateActivityContext(RegionNames.reg_property, evarg.session, column);
			Ctxdisp = ctx;

			UIdisp = TimeSettingsActivity
				.Run(ctx)
				.Subscribe(x => {
				}, err => {
					dbg.Error(err);
				});
		}
		void RulesClick(ChannelLinkEventArgs evarg) {
			ReleaseViewModels(RegionNames.reg_property);

			ContentColumn column = new ContentColumn();
			ShowView(column, "RulesClick", RegionNames.reg_property);
			column.CreateBinding(ContentColumn.TitleProperty, LinkButtonsStrings.instance, x => x.ruleEngine);
			var ctx = CreateActivityContext(RegionNames.reg_property, evarg.session, column);

			//TODO: Stub fix for #225 Remove this with plugin functionality
			ILastChangedModule lmodule = new LastChangedModule();
			ctx.RegisterInstance<ILastChangedModule>(lmodule);
			//

			StreamInfoHelper strinfo = new StreamInfoHelper();
			strinfo.streamInfo = () => {
				return Apm.Iterate(LoadStreamInfoNVT(evarg, strinfo));
			};
			ctx.RegisterInstance<IStreamInfoHelper>(strinfo);

			Ctxdisp = ctx;

			ctx.RegisterInstance<IVideoInfo>(evarg.videoInfo);
			ctx.RegisterInstance<odm.ui.activities.AnalyticsView.AnalyticType>(odm.ui.activities.AnalyticsView.AnalyticType.RULE);

			string token = null;
			if (evarg.profile.videoAnalyticsConfiguration != null)
				token = evarg.profile.videoAnalyticsConfiguration.token;
			UIdisp = AnalyticsActivity
				.Run(ctx, token)
				.Subscribe(x => {
					//TODO: handle return from activity
				}, err => {
					dbg.Error(err);
				});
		}
		void MaintenanceClick(MaintenanceLinkEventArgs evarg) {
			ReleaseViewModels(RegionNames.reg_property);

			ContentColumn column = new ContentColumn();
			ShowView(column, "MaintenanceClick", RegionNames.reg_property);
			column.CreateBinding(ContentColumn.TitleProperty, LinkButtonsStrings.instance, x => x.maintenance);
			var ctx = CreateActivityContext(RegionNames.reg_property, evarg.session, column);

			ctx.RegisterInstance<IMaintenanceLinkEventArgs>(evarg);
			Ctxdisp = ctx;

			UIdisp = MaintenanceActivity
				.Run(ctx)
				.Subscribe(x => {
				}, err => {
					dbg.Error(err);
				});
		}
		void ActionTriggersClick(DeviceLinkEventArgs evarg) {
			ReleaseViewModels(RegionNames.reg_property);

			ContentColumn column = new ContentColumn();
			ShowView(column, "ActionTriggersClick", RegionNames.reg_property);

			column.CreateBinding(ContentColumn.TitleProperty, LocalTitles.instance, x => x.triggers);
			var ctx = CreateActivityContext(RegionNames.reg_property, evarg.session, column);

			Ctxdisp = ctx;

			UIdisp = ActionTriggerManagementActivity
				 .Run(ctx)
				 .Subscribe(x => {
				 }, err => {
					 dbg.Error(err);
				 });
		}