BaseUriHelper.GetBaseUri(DependencyObject) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the value of the BaseUri
for a specified UIElement.
public:
static Uri ^ GetBaseUri(System::Windows::DependencyObject ^ element);
[System.Security.SecurityCritical]
public static Uri GetBaseUri (System.Windows.DependencyObject element);
public static Uri GetBaseUri (System.Windows.DependencyObject element);
[<System.Security.SecurityCritical>]
static member GetBaseUri : System.Windows.DependencyObject -> Uri
static member GetBaseUri : System.Windows.DependencyObject -> Uri
Public Shared Function GetBaseUri (element As DependencyObject) As Uri
Parameters
- element
- DependencyObject
The element from which the property value is read.
Returns
The base URI of a given element.
- Attributes
Exceptions
element
is null
.
Remarks
Use this method to get the IUriContext.BaseUri property if it is implemented or the BaseUri attached property if is set on an element. GetBaseUri will traverse the parent elements of element
to search for the nearest BaseUri (IUriContext or attached property).
Applies to
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET