コード例 #1
0
        private StructureAdornmentManager(IWpfTextView view, StructureAdornmentFactory factory)
        {
            _view    = view;
            _factory = factory;
            _layer   = view.GetAdornmentLayer("StructureAdornmentLayer");

            _formatMap = factory.EditorFormatMapService.GetEditorFormatMap(view);

            _view.VisualElement.IsVisibleChanged += this.OnVisibleChanged;
            _view.Closed += this.OnClosed;

            _view.Options.OptionChanged += this.OnOptionChanged;
            this.OnOptionChanged(null, null);
        }
コード例 #2
0
 public static StructureAdornmentManager Create(IWpfTextView view, StructureAdornmentFactory factory)
 {
     return(view.Properties.GetOrCreateSingletonProperty <StructureAdornmentManager>(delegate { return new StructureAdornmentManager(view, factory); }));
 }