private static bool Internal_SetHorizontalScrollOffset(this ListBox list, double offset) { ScrollViewer scrollViewer = ExtensionMethods.FindVisualChild((FrameworkElement)list, "ScrollViewer") as ScrollViewer; if (scrollViewer == null) { return(false); } scrollViewer.ScrollToHorizontalOffset(offset); if (list is ISupportOffsetChanges) { (list as ISupportOffsetChanges).HorizontalOffsetChanged(offset); } return(true); }
public static double GetHorizontalScrollOffset(this ListBox list) { return((ExtensionMethods.FindVisualChild((FrameworkElement)list, "ScrollViewer") as ScrollViewer).HorizontalOffset); }