static ThemedTipText() { FocusableProperty.OverrideMetadata(typeof(ThemedTipText), new FrameworkPropertyMetadata(true)); TextEditorWrapper.RegisterCommandHandlers(typeof(ThemedTipText), true, true, true); // remove the focus rectangle around the control FocusVisualStyleProperty.OverrideMetadata(typeof(ThemedTipText), new FrameworkPropertyMetadata((object)null)); }
public static TextEditorWrapper CreateFor(TextBlock tb) { var textContainer = TextContainerProp.GetValue(tb); var editor = new TextEditorWrapper(textContainer, tb, false); IsReadOnlyProp.SetValue(editor._editor, true); TextViewProp.SetValue(editor._editor, TextContainerTextViewProp.GetValue(textContainer)); return(editor); }
public static TextEditorWrapper CreateFor(TextBlock textBlock) { if (__IsInitialized == false) { return(null); } var textContainer = TextContainerProp.GetValue(textBlock); var editor = new TextEditorWrapper(textContainer, textBlock, false); IsReadOnlyProp.SetValue(editor._editor, true); TextViewProp.SetValue(editor._editor, TextContainerTextViewProp.GetValue(textContainer)); return(editor); }
public ThemedTipText() { TextWrapping = TextWrapping.Wrap; Foreground = ThemeHelper.ToolTipTextBrush; TextEditorWrapper.CreateFor(this); }
static ThemedTipText() { TextEditorWrapper.RegisterCommandHandlers(typeof(TextBlock), true, true, true); }