object Revised string [BackstageTabItem.cs] & [RibbonTabItem.cs]

Jun 4, 2010 at 6:30 PM

edit BackstateTabItem.Header by properties window error "properties value is not valid"

Details:

Property 'Header' does not support String to Value conversion.

        /// <summary>
        /// Gets or sets tab items text
        /// </summary>
        public object Header
        {
            get { return GetValue(HeaderProperty); }
            set { SetValue(HeaderProperty, value); }
        }

        /// <summary>
        /// Using a DependencyProperty as the backing store for Text.  
        /// This enables animation, styling, binding, etc...
        /// </summary>
        public static readonly DependencyProperty HeaderProperty =DependencyProperty.Register("Header", typeof(object), typeof(BackstageTabItem), new UIPropertyMetadata(null));
Revised:
        /// <summary>
        /// Gets or sets tab items text
        /// </summary>
        public string Header
        {
            get { return (string)GetValue(HeaderProperty); }
            set { SetValue(HeaderProperty, value); }
        }

        /// <summary>
        /// Using a DependencyProperty as the backing store for Text.  
        /// This enables animation, styling, binding, etc...
        /// </summary>
        public static readonly DependencyProperty HeaderProperty =DependencyProperty.Register("Header", typeof(string), typeof(BackstageTabItem), new UIPropertyMetadata(null));