WinRTXamlToolkit.Controls.Calendar.OnCreateAutomationPeer C# (CSharp) Method

OnCreateAutomationPeer() protected method

Returns a T:WinRTXamlToolkit.Automation.Peers.CalendarAutomationPeer for use by the Silverlight automation infrastructure.

This method creates a new CalendarAutomationPeer instance if one has not been created for the control instance; otherwise, it returns the CalendarAutomationPeer 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 CalendarAutomationPeer(this);
        }