Method ResourceUtil.GetWpfImageElement
Overload
Gets WPF image element from XAML or other image resource.
public static FrameworkElement GetWpfImageElement(string name)
Parameters
name (string)
Resource name, like |
Returns
Exceptions
FileNotFoundException
Cannot find assembly or resource. |
InvalidOperationException
The resource type is not stream. |
Exception
Other exceptions that may be thrown by used .NET functions. |
Remarks
If name ends with ".xaml"
(case-insensitive), calls ResourceUtil.GetXamlObject. Else returns System.Windows.Controls.Image with Source = ResourceUtil.GetWpfImage.