Inheritance: IWpfTextViewMarginProvider
        /// <summary>
        /// Constructor for the OverviewMargin.
        /// </summary>
        /// <param name="textViewHost">The IWpfTextViewHost in which this margin will be displayed.</param>
        private OverviewMargin(IWpfTextViewHost textViewHost, IWpfTextViewMargin containerMargin, OverviewMarginProvider myProvider)
            : base(PredefinedOverviewMarginNames.Overview, Orientation.Vertical, textViewHost, myProvider.OrderedMarginProviders)
        {
            _provider = myProvider;

            _provider.LoadOption(base.TextViewHost.TextView.Options, DefaultOverviewMarginOptions.ExpandElisionsInOverviewMarginId.Name);
            _provider.LoadOption(base.TextViewHost.TextView.Options, DefaultOverviewMarginOptions.PreviewSizeId.Name);

            _provider.LoadOption(base.TextViewHost.TextView.Options, OverviewMargin.ElisionColorId.Name);
            _provider.LoadOption(base.TextViewHost.TextView.Options, OverviewMargin.OffScreenColorId.Name);
            _provider.LoadOption(base.TextViewHost.TextView.Options, OverviewMargin.VisibleColorId.Name);

            _outliningManager = myProvider.OutliningManagerService.GetOutliningManager(textViewHost.TextView);

            _scrollBar = new SimpleScrollBar(textViewHost, containerMargin, myProvider._scrollMapFactory, this, !base.TextViewHost.TextView.Options.GetOptionValue(DefaultOverviewMarginOptions.ExpandElisionsInOverviewMarginId));

            _elisionBrush   = this.GetBrush(OverviewMargin.ElisionColorId);
            _offScreenBrush = this.GetBrush(OverviewMargin.OffScreenColorId);
            _visibleBrush   = this.GetBrush(OverviewMargin.VisibleColorId);

            base.Background   = Brushes.Transparent;
            base.ClipToBounds = true;

            {
                var viewRoles = this.TextViewHost.TextView.Roles;
                foreach (var tipProvider in myProvider.OrderedTipProviders)
                {
                    if (viewRoles.ContainsAny(tipProvider.Metadata.TextViewRoles))
                    {
                        _orderedTipFactoryProviders.Add(tipProvider);
                    }
                }
            }

            base.TextViewHost.TextView.Options.OptionChanged += this.OnOptionsChanged;
        }
        /// <summary>
        /// Factory for the OverviewMargin.
        /// </summary>
        /// <param name="textViewHost">The IWpfTextViewHost in which this margin will be displayed.</param>
        /// <param name="myProvider">Will be queried for various imported components.</param>
        public static OverviewMargin Create(IWpfTextViewHost textViewHost, IWpfTextViewMargin containerMargin, OverviewMarginProvider myProvider)
        {
            OverviewMargin margin = new OverviewMargin(textViewHost, containerMargin, myProvider);

            margin.Initialize();

            return(margin);
        }