コード例 #1
0
 public void Detach()
 {
     _drawerObser = null;
     if (_sc == null)
     {
         return;
     }
     _sc.DirectManipulationStarted -= _sc_DirectManipulationStarted;
     _sc.ViewChanged -= _sc_ViewChanged;;
     _sc              = null;
 }
コード例 #2
0
 public void Attach(DependencyObject associatedObject)
 {
     _sc = associatedObject as ScrollViewer;
     if (_sc == null)
     {
         return;
     }
     _drawerObser = new DrawerCloserObserver(_sc, null);
     _sc.DirectManipulationStarted -= _sc_DirectManipulationStarted;
     _sc.DirectManipulationStarted += _sc_DirectManipulationStarted;
     _sc.ViewChanged -= _sc_ViewChanged;;
     _sc.ViewChanged += _sc_ViewChanged;
 }