ImageExtensionsToIcon(Image, Size, Boolean, Color) Method
Converts an Image to a Icon
of the specified size.
Namespace: DevCase.Extensions.ImageExtensionsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static Icon ToIcon(
this Image image,
Size size,
bool makeTransparent = false,
Color transparentColor = default
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function ToIcon (
image As Image,
size As Size,
Optional makeTransparent As Boolean = false,
Optional transparentColor As Color = Nothing
) As Icon
Dim image As Image
Dim size As Size
Dim makeTransparent As Boolean
Dim transparentColor As Color
Dim returnValue As Icon
returnValue = image.ToIcon(size, makeTransparent,
transparentColor)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
static Icon^ ToIcon(
Image^ image,
Size size,
bool makeTransparent = false,
Color transparentColor = Color()
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member ToIcon :
image : Image *
size : Size *
?makeTransparent : bool *
?transparentColor : Color
(* Defaults:
let _makeTransparent = defaultArg makeTransparent false
let _transparentColor = defaultArg transparentColor new Color()
*)
-> Icon
No code example is currently available or this language may not be supported.
- image Image
-
The source Image.
- size Size
-
The output icon size.
- makeTransparent Boolean (Optional)
-
Optional. If True, makes transparent the output icon. Default value is false.
- transparentColor Color (Optional)
-
Optional. The color used to make transparent the output icon. Default value is null.
Icon
The resulting
Icon.
In Visual Basic and C#, you can call this method as an instance method on any object of type
Image. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).