コード例 #1
0
        protected override bool IsControlElementCore()
        {
            // Return false if RibbonTwoLineText is part of a ControlTemplate, otherwise return the base method
            RibbonTwoLineText tlt             = (RibbonTwoLineText)Owner;
            DependencyObject  templatedParent = tlt.TemplatedParent;

            // If the templatedParent is a ContentPresenter, this RibbonTwoLineText is generated from a DataTemplate
            if (templatedParent == null || templatedParent is ContentPresenter)
            {
                return(base.IsControlElementCore());
            }

            return(false);
        }
コード例 #2
0
 ///
 public RibbonTwoLineTextAutomationPeer(RibbonTwoLineText owner) : base(owner)
 {
 }