| File: Microsoft\Windows\Automation\Peers\RibbonSeparatorAutomationPeer.cs | Web Access |
| Project: src\wpf\src\Microsoft.DotNet.Wpf\src\System.Windows.Controls.Ribbon\System.Windows.Controls.Ribbon.csproj (System.Windows.Controls.Ribbon) |
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. #region Using declarations #if RIBBON_IN_FRAMEWORK using System.Windows.Controls.Ribbon; #if RIBBON_IN_FRAMEWORK namespace System.Windows.Automation.Peers #else namespace Microsoft.Windows.Automation.Peers #endif { #else using Microsoft.Windows.Controls.Ribbon; #endif #endregion /// <summary> /// An automation peer class which automates the RibbonSeparator control. /// </summary> public class RibbonSeparatorAutomationPeer : SeparatorAutomationPeer { /// <summary> /// Initializes automation peer for RibbonSeparator. /// </summary> public RibbonSeparatorAutomationPeer(RibbonSeparator owner) : base(owner) { } /// <summary> /// Return class name for automation clients to display /// </summary> protected override string GetClassNameCore() { return Owner.GetType().Name; } /// <summary> /// Returns name for automation clients to display /// </summary> protected override string GetNameCore() { string name = base.GetNameCore(); if (String.IsNullOrEmpty(name)) { name = ((RibbonSeparator)Owner).Label; } return name; } } }