internal void Attach(DependencyObject element) { // try access scrollviewer var sv = element.FindFirstChild<ScrollViewer>(); if (sv == null) { // if null, wait loaded ((FrameworkElement)element).Loaded += TargetView_Loaded; return; } UpdateProperties(sv); }