private static void AttachScrollHandlers(ScrollablePanel p, FrameworkElement fe, DependencyProperty property) { Extensions.TraverseVisualTree(fe, e => { if (GetIsScroller(e)) { if (e is ButtonBase) { (e as ButtonBase).SetBinding(ButtonBase.CommandProperty, new Binding(property.Name) { Source = p }); } } return(Extensions.TraverseResult.Continue); }); }
private static void AttachScrollHandlers(ScrollablePanel p, FrameworkElement fe, DependencyProperty property) { Extensions.TraverseVisualTree(fe, e => { if (GetIsScroller(e)) { if (e is ButtonBase) { (e as ButtonBase).SetBinding(ButtonBase.CommandProperty, new Binding(property.Name) { Source = p }); } } return Extensions.TraverseResult.Continue; }); }