WinRTXamlToolkit.Controls.Primitives.CalendarButton.OnCreateAutomationPeer C# (CSharp) Method

OnCreateAutomationPeer() protected method

Returns a CalendarButtonAutomationPeer for use by the Silverlight automation infrastructure.

This method creates a new CalendarButtonAutomationPeer instance if one has not been created for the CalendarButton; otherwise, it returns the CalendarButtonAutomationPeer previously created.

Classes that participate in the Silverlight automation infrastructure must implement this method to return a class-specific derived class of AutomationPeer that reports information for automation behavior.

protected OnCreateAutomationPeer ( ) : AutomationPeer
return Windows.UI.Xaml.Automation.Peers.AutomationPeer
        protected override AutomationPeer OnCreateAutomationPeer()
        {
            return new CalendarButtonAutomationPeer(this);
        }