/// <summary>
        /// Handles the referencedContent property changes in order to update the Anchor property
        /// </summary>
        /// <param name="depObj"></param>
        /// <param name="e"></param>
        static void OnPaneAttached(DependencyObject depObj, DependencyPropertyChangedEventArgs e)
        {
            //Update Anchor, Title and Icon property
            DockablePaneAnchorTab _this = depObj as DockablePaneAnchorTab;

            _this.SetAnchor(((DockablePane)_this.ReferencedContent.ContainerPane).Anchor);
            _this.SetIcon(_this.ReferencedContent.Icon);
            _this.SetTitle(_this.ReferencedContent.Title);
        }
示例#2
0
        /// <summary>
        /// Handles the referencedContent property changes in order to update the Anchor property
        /// </summary>
        /// <param name="depObj"></param>
        /// <param name="e"></param>
        static void OnPaneAttached(DependencyObject depObj, DependencyPropertyChangedEventArgs e)
        {
            //Update Anchor, Title and Icon property
            DockablePaneAnchorTab _this = depObj as DockablePaneAnchorTab;

            _this.SetAnchor(((DockablePane)_this.ReferencedContent.ContainerPane).Anchor);
            _this.SetIcon(_this.ReferencedContent.Icon);

            //Update by yohan, sync title with anchor tab and content.
            Binding bind = new Binding("Title");

            bind.Source = _this.ReferencedContent;
            _this.SetBinding(DockablePaneAnchorTab.TitleProperty, bind);
            //_this.SetTitle(_this.ReferencedContent.Title);
        }