다음을 통해 공유


AutoCompleteBox.GetSelectionAdapterPart Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Returns the specified object as an ISelectionAdapter, if possible.

Namespace:  System.Windows.Controls
Assembly:  System.Windows.Controls.Input (in System.Windows.Controls.Input.dll)

Syntax

'Declaration
Protected Overridable Function GetSelectionAdapterPart As ISelectionAdapter
protected virtual ISelectionAdapter GetSelectionAdapterPart()

Return Value

Type: System.Windows.Controls.ISelectionAdapter
A ISelectionAdapter if possible; otherwise, nulla null reference (Nothing in Visual Basic).

Remarks

This method returns the selection adapter template part as an ISelectionAdapter. If the selection adapter part implements ISelectionAdapter or derives from Selector, it will automatically be returned as an ISelectionAdapter object; otherwise, the GetSelectionAdapterPart method tries to cast the selector part to an ISelectionAdapter. If the part is not found or the cast fails, GetSelectionAdapterPart returns nulla null reference (Nothing in Visual Basic).

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.