Attempts to load a Xaml resource from an Assembly-based resource

C# | Visual Basic | Visual C++ |
public bool TryLoadResource( ResourcePath path )
Public Function TryLoadResource ( _ path As ResourcePath _ ) As Boolean
public: bool TryLoadResource( ResourcePath^ path )

- path (ResourcePath)
- A ResourcePath which identifies the resource to load

A boolean value indicating whether the resource was loaded successfully

ResourceControl control = new ResourceControl();
ResourcePath path = new ResourcePath(MyCompany.Controls.MyControlType, "MyCompany.Resources.SomeXamlGraphic.xaml");
if (!control.LoadResource(path))
{
//Do Something
}