コード例 #1
0
        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));
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
 public ThemedTipText()
 {
     TextWrapping = TextWrapping.Wrap;
     Foreground   = ThemeHelper.ToolTipTextBrush;
     TextEditorWrapper.CreateFor(this);
 }
コード例 #5
0
 static ThemedTipText()
 {
     TextEditorWrapper.RegisterCommandHandlers(typeof(TextBlock), true, true, true);
 }