AvalonStudio.TextEditor.TextEditor.TextEditor C# (CSharp) 메소드

TextEditor() 정적인 개인적인 메소드

static private TextEditor ( ) : System
리턴 System
        static TextEditor()
        {            
            FocusableProperty.OverrideDefaultValue(typeof(TextEditor), true);

            CaretIndexProperty.Changed.AddClassHandler<TextEditor>((s, v) =>
            {
                if (s.TextDocument != null && s.CaretIndex != -1 && s.TextView != null)
                {
                    s.InvalidateCaretPosition();

                    s.InvalidateSelectedWord();
                }
            });

            HeaderProperty.Changed.AddClassHandler<TextEditor>((s, v) =>
            {
                if (v.OldValue as ILogical != null)
                {
                    s.LogicalChildren.Remove(v.OldValue as ILogical);
                }

                if (v.NewValue as ILogical != null)
                {
                    s.LogicalChildren.Add(v.NewValue as ILogical);
                }
            });

            ContentProperty.Changed.AddClassHandler<TextEditor>((s, v) =>
            {
                if (v.OldValue as ILogical != null)
                {
                    s.LogicalChildren.Remove(v.OldValue as ILogical);
                }

                if (v.NewValue as ILogical != null)
                {
                    s.LogicalChildren.Add(v.NewValue as ILogical);
                }
            });

            Dispatcher.UIThread.InvokeAsync(() =>
            {
                Application.Current.Styles.Add(new TextEditorTheme());
            });
        }