IRawElementProviderSimple.HostRawElementProvider Właściwość
Definicja
Pobiera podstawowego dostawcę dla tego elementu.Gets a base provider for this element.
public:
property System::Windows::Automation::Provider::IRawElementProviderSimple ^ HostRawElementProvider { System::Windows::Automation::Provider::IRawElementProviderSimple ^ get(); };
public System.Windows.Automation.Provider.IRawElementProviderSimple HostRawElementProvider { get; }
member this.HostRawElementProvider : System.Windows.Automation.Provider.IRawElementProviderSimple
Public ReadOnly Property HostRawElementProvider As IRawElementProviderSimple
Wartość właściwości
Podstawowy dostawca lub null
.The base provider, or null
.
Przykłady
Poniższy przykładowy kod przedstawia implementację HostRawElementProvider katalogu głównego fragmentów, który jest hostowany w formularzu systemu Windows.The following example code shows an implementation of HostRawElementProvider for a fragment root that is hosted in a Windows form.
IRawElementProviderSimple IRawElementProviderSimple.HostRawElementProvider
{
get
{
// myHWND is the handle of the window that contains this control.
return AutomationInteropProvider.HostProviderFromHandle(myHWND);
}
}
ReadOnly Property HostRawElementProvider() As IRawElementProviderSimple _
Implements IRawElementProviderSimple.HostRawElementProvider
Get
' myHWND is the handle of the window that contains this control.
Return AutomationInteropProvider.HostProviderFromHandle(myHWND)
End Get
End Property
Uwagi
Ta właściwość jest dostawcą automatyzacji interfejsu użytkownika dla okna kontrolki niestandardowej.This property is the UI Automation provider for the window of a custom control. Automatyzacja interfejsu użytkownika używa tego dostawcy w połączeniu z implementacją dostawcy dla kontrolki hostowanej w oknie.UI Automation uses this provider in combination with your provider implementation for a control hosted in a window. Na przykład identyfikator w czasie wykonywania elementu jest uzyskiwany od dostawcy hosta.For example, the run-time identifier of the element is obtained from the host provider.
Dostawca hosta musi być zwracany w następujących przypadkach:A host provider must be returned in any of the following cases:
Ten element jest elementem głównym fragmentu.This element is the root of a fragment.
Element to prosty element, taki jak przycisk.The element is a simple element such as a pushbutton.
Dostawca jest symbolem zastępczym zmiany położenia.The provider is a repositioning placeholder.
W innych przypadkach właściwość powinna zwrócić null
.In other cases, the property should return null
.