Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class AutoSuggestTextBox: TextBox
- {
- protected override AutomationPeer OnCreateAutomationPeer()
- {
- return new AutoSuggestTextBoxAutomationPeer(this);
- }
- public ListBox SuggestionListBox;
- }
- internal class AutoSuggestTextBoxAutomationPeer : TextBoxAutomationPeer
- {
- public AutoSuggestTextBoxAutomationPeer(AutoSuggestTextBox owner) : base(owner)
- {
- }
- protected override List<AutomationPeer> GetControlledPeersCore()
- {
- List<AutomationPeer> controlledPeers = new List<AutomationPeer>();
- AutoSuggestTextBox owner = Owner as AutoSuggestTextBox;
- controlledPeers.Add(UIElementAutomationPeer.CreatePeerForElement(owner.SuggestionListBox));
- return controlledPeers;
- }
- }
Add Comment
Please, Sign In to add comment