1 //----------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation. All rights reserved.
3 //----------------------------------------------------------------
4 namespace System.Activities.Presentation.Internal.PropertyEditing.Automation
7 using System.Diagnostics.CodeAnalysis;
8 using System.Windows.Automation.Peers;
9 using System.Windows.Controls;
12 // Standard ComboBox. However, it uses AutomatedListBoxItemAutomationPeer to represent
13 // all items within it, which is our class and which allows us to return user-friendly
14 // representation of all Cider structures exposed through automation.
16 [SuppressMessage("Microsoft.Maintainability", "CA1501:AvoidExcessiveInheritance")]
17 internal class AutomatedComboBox : ComboBox
20 protected override AutomationPeer OnCreateAutomationPeer()
22 return new AutomatedComboBoxAutomationPeer(this);
25 private class AutomatedComboBoxAutomationPeer : ComboBoxAutomationPeer
27 public AutomatedComboBoxAutomationPeer(AutomatedComboBox owner)
32 protected override ItemAutomationPeer CreateItemAutomationPeer(object item)
34 return new AutomatedListBoxItemAutomationPeer(item, this);