示例#1
0
        static SelectableTextBlock()
        {
            FocusableProperty.OverrideMetadata(typeof(SelectableTextBlock), new FrameworkPropertyMetadata(true));
            TextEditorWrapper.RegisterCommandHandlers(typeof(SelectableTextBlock), true, true, true);

            // remove the focus rectangle around the control
            FocusVisualStyleProperty.OverrideMetadata(typeof(SelectableTextBlock), new FrameworkPropertyMetadata((object)null));
        }
示例#2
0
        public static TextEditorWrapper CreateFor(TextBlock tb)
        {
            object textContainer = TextContainerProp.GetValue(tb);

            TextEditorWrapper editor = new TextEditorWrapper(textContainer, tb, false);

            IsReadOnlyProp.SetValue(editor.editor_, true);
            TextViewProp.SetValue(editor.editor_, TextContainerTextViewProp.GetValue(textContainer));

            return(editor);
        }
示例#3
0
 public SelectableTextBlock()
 {
     this.editor_ = TextEditorWrapper.CreateFor(this);
 }