void IViewAware.AttachView(object view, object context)
 {
     RoutedEventHandler handler = null;
     if (this.CacheViews)
     {
         this.Views[context ?? View.DefaultContext] = view;
     }
     object obj2 = View.GetFirstNonGeneratedView(view);
     FrameworkElement element = obj2 as FrameworkElement;
     if ((element != null) && !((bool) element.GetValue(PreviouslyAttachedProperty)))
     {
         element.SetValue(PreviouslyAttachedProperty, true);
         if (handler == null)
         {
             handler = (s, e) => this.OnViewLoaded(s);
         }
         View.ExecuteOnLoad(element, handler);
     }
     this.OnViewAttached(obj2, context);
     ViewAttachedEventArgs args = new ViewAttachedEventArgs {
         View = obj2,
         Context = context
     };
     this.ViewAttached(this, args);
 }
 private static void PageTwoViewModel_ViewAttached(object sender, ViewAttachedEventArgs e)
 {
     Log.Info("PageTwoViewModel_ViewAttached");
 }
		private async void OnViewAttachedEventHandler(object sender, ViewAttachedEventArgs args)
		{
			Log("OnViewAttachedEventHandler- starting a 1 second task");
			await Task.Delay(1000);
			Log("OnViewAttachedEventHandler completed");
		}
        public void HandleViewAttached(object viewObject, ViewAttachedEventArgs eventArgs)
        {
            var view = (MapEditorScreenView)eventArgs.View;

            GraphicEditor = (EditGeometryExtended)view.Resources["GraphicEditor"];
            Map = (Map)view.FindName("MyMap");

            GraphicEditor.Init(Map);
        }