private static void OnColorValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { TextVisual bin = (TextVisual)d; if (bin.Model != null) { bin.Model.BackgroundColor = bin.Color.Color; } }
private static void OnIsSelectedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { TextVisual bin = (TextVisual)d; bin.mainRTB.Focusable = bin.IsSelected; if (bin.IsSelected) { bin.mainRTB.Loaded += new RoutedEventHandler(mainRTB_Loaded); } }