Example #1
0
 internal void OnInPlaceDeactivate(ActiveXHost site)
 {
     //
     if (this.ActiveXHost == site)
     {
     }
 }
Example #2
0
 internal void OnInPlaceDeactivate(ActiveXHost site)
 {
     //TODO: Clear the focus here too?
     if (this.ActiveXHost == site)
     {
     }
 }
Example #3
0
        //
        // The constructor takes an ActiveXHost as a parameter, so unfortunately,
        // this cannot be used as a standalone site. It has to be used in conjunction
        // with ActiveXHost. Perhaps we can change it in future.
        //

        internal ActiveXSite(ActiveXHost host)
        {
            if (host == null)
            {
                throw new ArgumentNullException("host");
            }
            _host = host;
        }
Example #4
0
 internal void OnUIActivate(ActiveXHost site)
 {
     if (this._siteUIActive == site)
     {
         return;
     }
     if (this._siteUIActive != null)
     {
         ActiveXHost siteUIActive = this._siteUIActive;
         siteUIActive.ActiveXInPlaceObject.UIDeactivate();
     }
     this._siteUIActive = site;
 }
Example #5
0
        internal void OnUIDeactivate(ActiveXHost site)
        {
#if DEBUG
            if (_siteUIActive != null)
            {
                //
                Debug.Assert(this.ActiveXHost == site, "deactivating when not active...");
            }
#endif // DEBUG

            //


            _siteUIActive = null;
        }
Example #6
0
        internal void OnUIDeactivate(ActiveXHost site)
        {
#if DEBUG
            if (_siteUIActive != null)
            {
                //TODO: Debug.Assert(_siteUIActive == site, "deactivating when not active...");
                Debug.Assert(this.ActiveXHost == site, "deactivating when not active...");
            }
#endif // DEBUG

            //TODO: Clear focus from the WebOC of set in OnUIActivate
            //Winforms WebOC code does this only in OnInPlaceDeactivate
            //but this seems to be the right place to do it
            _siteUIActive = null;
        }
Example #7
0
        internal void OnUIActivate(ActiveXHost site)
        {
            // The ShDocVw control repeatedly calls OnUIActivate() with the same
            // site. This causes the assert below to fire.
            //
            if (_siteUIActive == site)
            {
                return;
            }

            if (_siteUIActive != null)
            {
                //Microsoft WebOC also uses ActiveXHost instead of ActiveXSite.
                //Ideally it should have been the site but since its a 1-1 relationship
                //for hosting the webOC, it will work
                ActiveXHost tempSite = _siteUIActive;
                tempSite.ActiveXInPlaceObject.UIDeactivate();
            }
            Debug.Assert(_siteUIActive == null, "Object did not call OnUIDeactivate");
            _siteUIActive = site;

            //
        }
 public static IObservable <EventPattern <ManipulationCompletedEventArgs> > ManipulationCompletedObserver(this ActiveXHost This)
 {
     return(Observable.FromEventPattern <EventHandler <ManipulationCompletedEventArgs>, ManipulationCompletedEventArgs>(h => This.ManipulationCompleted += h, h => This.ManipulationCompleted -= h));
 }
 public static IObservable <EventPattern <ToolTipEventArgs> > ToolTipClosingObserver(this ActiveXHost This)
 {
     return(Observable.FromEventPattern <ToolTipEventHandler, ToolTipEventArgs>(h => This.ToolTipClosing += h, h => This.ToolTipClosing -= h));
 }
 public static IObservable <EventPattern <ManipulationInertiaStartingEventArgs> > ManipulationInertiaStartingObserver(this ActiveXHost This)
 {
     return(Observable.FromEventPattern <EventHandler <ManipulationInertiaStartingEventArgs>, ManipulationInertiaStartingEventArgs>(h => This.ManipulationInertiaStarting += h, h => This.ManipulationInertiaStarting -= h));
 }
 public static IObservable <EventPattern <ManipulationBoundaryFeedbackEventArgs> > ManipulationBoundaryFeedbackObserver(this ActiveXHost This)
 {
     return(Observable.FromEventPattern <EventHandler <ManipulationBoundaryFeedbackEventArgs>, ManipulationBoundaryFeedbackEventArgs>(h => This.ManipulationBoundaryFeedback += h, h => This.ManipulationBoundaryFeedback -= h));
 }
 public static IObservable <EventPattern <GiveFeedbackEventArgs> > GiveFeedbackObserver(this ActiveXHost This)
 {
     return(Observable.FromEventPattern <GiveFeedbackEventHandler, GiveFeedbackEventArgs>(h => This.GiveFeedback += h, h => This.GiveFeedback -= h));
 }
 public static IObservable <EventPattern <RequestBringIntoViewEventArgs> > RequestBringIntoViewObserver(this ActiveXHost This)
 {
     return(Observable.FromEventPattern <RequestBringIntoViewEventHandler, RequestBringIntoViewEventArgs>(h => This.RequestBringIntoView += h, h => This.RequestBringIntoView -= h));
 }
 public static IObservable <EventPattern <EventArgs> > LayoutUpdatedObserver(this ActiveXHost This)
 {
     return(Observable.FromEventPattern <EventHandler, EventArgs>(h => This.LayoutUpdated += h, h => This.LayoutUpdated -= h));
 }
 public static IObservable <EventPattern <MouseButtonEventArgs> > PreviewMouseLeftButtonDownObserver(this ActiveXHost This)
 {
     return(Observable.FromEventPattern <MouseButtonEventHandler, MouseButtonEventArgs>(h => This.PreviewMouseLeftButtonDown += h, h => This.PreviewMouseLeftButtonDown -= h));
 }
 public static IObservable <EventPattern <TouchEventArgs> > PreviewTouchUpObserver(this ActiveXHost This)
 {
     return(Observable.FromEventPattern <EventHandler <TouchEventArgs>, TouchEventArgs>(h => This.PreviewTouchUp += h, h => This.PreviewTouchUp -= h));
 }
 public static IObservable <EventPattern <TouchEventArgs> > TouchLeaveObserver(this ActiveXHost This)
 {
     return(Observable.FromEventPattern <EventHandler <TouchEventArgs>, TouchEventArgs>(h => This.TouchLeave += h, h => This.TouchLeave -= h));
 }
 public static IObservable <EventPattern <DragEventArgs> > DropObserver(this ActiveXHost This)
 {
     return(Observable.FromEventPattern <DragEventHandler, DragEventArgs>(h => This.Drop += h, h => This.Drop -= h));
 }
 public static IObservable <EventPattern <DragEventArgs> > PreviewDragLeaveObserver(this ActiveXHost This)
 {
     return(Observable.FromEventPattern <DragEventHandler, DragEventArgs>(h => This.PreviewDragLeave += h, h => This.PreviewDragLeave -= h));
 }
 public static IObservable <EventPattern <SizeChangedEventArgs> > SizeChangedObserver(this ActiveXHost This)
 {
     return(Observable.FromEventPattern <SizeChangedEventHandler, SizeChangedEventArgs>(h => This.SizeChanged += h, h => This.SizeChanged -= h));
 }
 public static IObservable <EventPattern <ContextMenuEventArgs> > ContextMenuClosingObserver(this ActiveXHost This)
 {
     return(Observable.FromEventPattern <ContextMenuEventHandler, ContextMenuEventArgs>(h => This.ContextMenuClosing += h, h => This.ContextMenuClosing -= h));
 }
 public static IObservable <EventPattern <TextCompositionEventArgs> > TextInputObserver(this ActiveXHost This)
 {
     return(Observable.FromEventPattern <TextCompositionEventHandler, TextCompositionEventArgs>(h => This.TextInput += h, h => This.TextInput -= h));
 }
 public static IObservable <EventPattern <MouseButtonEventArgs> > MouseUpObserver(this ActiveXHost This)
 {
     return(Observable.FromEventPattern <MouseButtonEventHandler, MouseButtonEventArgs>(h => This.MouseUp += h, h => This.MouseUp -= h));
 }
Example #24
0
        internal ActiveXContainer(ActiveXHost host)
        {
            this._host = host;

            Invariant.Assert(_host != null);
        }
 public static IObservable <EventPattern <DependencyPropertyChangedEventArgs> > FocusableChangedObserver(this ActiveXHost This)
 {
     return(Observable.FromEventPattern <DependencyPropertyChangedEventHandler, DependencyPropertyChangedEventArgs>(h => This.FocusableChanged += h, h => This.FocusableChanged -= h));
 }
 public static IObservable <EventPattern <QueryContinueDragEventArgs> > QueryContinueDragObserver(this ActiveXHost This)
 {
     return(Observable.FromEventPattern <QueryContinueDragEventHandler, QueryContinueDragEventArgs>(h => This.QueryContinueDrag += h, h => This.QueryContinueDrag -= h));
 }
 public static IObservable <EventPattern <KeyEventArgs> > KeyUpObserver(this ActiveXHost This)
 {
     return(Observable.FromEventPattern <KeyEventHandler, KeyEventArgs>(h => This.KeyUp += h, h => This.KeyUp -= h));
 }
 public static IObservable <EventPattern <RoutedEventArgs> > UnloadedObserver(this ActiveXHost This)
 {
     return(Observable.FromEventPattern <RoutedEventHandler, RoutedEventArgs>(h => This.Unloaded += h, h => This.Unloaded -= h));
 }
 public static IObservable <EventPattern <RoutedEventArgs> > LostFocusObserver(this ActiveXHost This)
 {
     return(Observable.FromEventPattern <RoutedEventHandler, RoutedEventArgs>(h => This.LostFocus += h, h => This.LostFocus -= h));
 }
 public static IObservable <EventPattern <KeyboardFocusChangedEventArgs> > LostKeyboardFocusObserver(this ActiveXHost This)
 {
     return(Observable.FromEventPattern <KeyboardFocusChangedEventHandler, KeyboardFocusChangedEventArgs>(h => This.LostKeyboardFocus += h, h => This.LostKeyboardFocus -= h));
 }