public void SetChild(IWidgetBackend child) { // Remove the old child before adding the new one // The child has to be removed from the viewport if (ScrollViewer.Content != null) { var port = (CustomScrollViewPort)ScrollViewer.Content; port.Children.Remove(port.Children[0]); } if (child == null) { return; } SetChildPlacement(child); ScrollAdjustmentBackend vbackend = null, hbackend = null; var widget = (WidgetBackend)child; if (widget.EventSink.SupportsCustomScrolling()) { vscrollControl = vbackend = new ScrollAdjustmentBackend(); hscrollControl = hbackend = new ScrollAdjustmentBackend(); } ScrollViewer.Content = new CustomScrollViewPort(widget.NativeWidget, vbackend, hbackend); ScrollViewer.CanContentScroll = true; if (vbackend != null) { widget.EventSink.SetScrollAdjustments(hbackend, vbackend); } }
public IScrollControlBackend CreateHorizontalScrollControl() { if (horScroll == null) { horScroll = new ScrollControlBackend(ApplicationContext, Widget, false); } return(horScroll); }
public IScrollControlBackend CreateVerticalScrollControl() { if (vertScroll == null) { vertScroll = new ScrollControlBackend(ApplicationContext, Widget, true); } return(vertScroll); }
public IScrollControlBackend CreateHorizontalScrollControl() { if (hscrollControl == null) { hscrollControl = new ScrollControlBackend(ScrollViewer, false); } return(hscrollControl); }
public IScrollControlBackend CreateVerticalScrollControl() { if (vscrollControl == null) { vscrollControl = new ScrollControlBackend(ScrollViewer, true); } return(vscrollControl); }
public IScrollControlBackend CreateHorizontalScrollControl() { if (hscrollControl == null) hscrollControl = new ScrollControlBackend(ScrollViewer, false); return hscrollControl; }
public IScrollControlBackend CreateVerticalScrollControl() { if (vscrollControl == null) vscrollControl = new ScrollControlBackend(ScrollViewer, true); return vscrollControl; }
public void SetChild (IWidgetBackend child) { // Remove the old child before adding the new one // The child has to be removed from the viewport if (ScrollViewer.Content != null) { var port = (CustomScrollViewPort)ScrollViewer.Content; port.Children.Remove (port.Children[0]); } if (child == null) return; SetChildPlacement (child); ScrollAdjustmentBackend vbackend = null, hbackend = null; var widget = (WidgetBackend)child; if (widget.EventSink.SupportsCustomScrolling ()) { vscrollControl = vbackend = new ScrollAdjustmentBackend (); hscrollControl = hbackend = new ScrollAdjustmentBackend (); } ScrollViewer.Content = new CustomScrollViewPort (widget.NativeWidget, vbackend, hbackend); ScrollViewer.CanContentScroll = true; if (vbackend != null) widget.EventSink.SetScrollAdjustments (hbackend, vbackend); }
internal ScrollControl(IScrollControlBackend backend) { BackendHost.SetCustomBackend(backend); backend.Initialize((ScrollAdjustmentBackendHost)BackendHost); }