/// <summary>
        /// When implemented in a derived class, returns an object that is provided
        /// as the value of the target property for this markup extension.
        ///
        /// When a XAML processor processes a type node and member value that is a markup extension,
        /// it invokes the ProvideValue method of that markup extension and writes the mResult into the
        /// object graph or serialization stream. The XAML object writer passes service context to each
        /// such implementation through the serviceProvider parameter.
        /// </summary>
        /// <param name="serviceProvider"></param>
        /// <returns></returns>
        public override object ProvideValue(IServiceProvider serviceProvider)
        {
            if (converter == null)
            {
                converter = new ActiveDocumentToVisibilityConverter();
            }

            return(converter);
        }
 /// <summary>
 /// When implemented in a derived class, returns an object that is provided
 /// as the value of the target property for this markup extension.
 ///
 /// When a XAML processor processes a type node and member value that is a markup extension,
 /// it invokes the ProvideValue method of that markup extension and writes the mResult into the
 /// object graph or serialization stream. The XAML object writer passes service context to each
 /// such implementation through the serviceProvider parameter.
 /// </summary>
 /// <param name="serviceProvider"></param>
 /// <returns></returns>
 public override object ProvideValue(IServiceProvider serviceProvider)
 {
     return(_converter ?? (_converter = new ActiveDocumentToVisibilityConverter()));
 }