public EventAggregatorExceptionDialogSource(IEventAggregator EventAggregator, IDispatcherFacade DispatcherFacade, IHintProvider HintProvider) { _dispatcherFacade = DispatcherFacade; _hintProvider = HintProvider; DialogInteractionRequest = new InteractionRequest<RequestDialogInteractionContext<ExceptionDialogViewModel>>(); EventAggregator.GetEvent<HandledExceptionEvent>().Subscribe(OnExceptionHandled); }
protected override void OnActivated() { base.OnActivated(); Frame.TemplateChanged += new EventHandler(Frame_TemplateChanged); IHintProvider hintProvider = HintsRepository.Instance.FindHintProvider(View); if (hintProvider == null && View is ObjectView) { hintProvider = ((ObjectView)View).ObjectTypeInfo.FindAttribute <HintAttribute>(); } calculator = new HintCalculator(hintProvider); if (View is DetailView) { calculator.CurrentViewType = ViewType.DetailView; } if (View is ListView) { calculator.CurrentViewType = ViewType.ListView; } calculator.HintChanged += new EventHandler <EventArgs>(calculator_HintChanged); View.CurrentObjectChanged += new EventHandler(View_CurrentObjectChanged); calculator.CurrentObject = View.CurrentObject; SetText(); }
public HintCalculator(IHintProvider hintProvider) { this.hintProvider = hintProvider; }
public CompositeHintProvider(IHintProvider[] ChildrenProviders) { _childrenProviders = ChildrenProviders; }