Skip to content

DeviceIcon

Class in Oadm.Sdk.Client.Controls · Oadm.Sdk.Client.dll

The icon of a device everywhere a device is listed (the device grid, the Web View tree): the icon of its category (Icon.device.*), neutral while the device is OK, amber when it needs attention (Credentials required, Password not set, Certificate changed), red when it does not answer. DeviceIcon.ShowStatusToolTip puts the reason on hover.

public sealed class DeviceIcon : Decorator

Inherits Decorator

Set them in XAML (<ui:DeviceIcon Name="..." />) or bind them.

Name Type Description
Category DeviceCategory Which device icon to draw.
ShowStatusToolTip bool True: the tooltip is the status message for a device that needs attention, else the category.
Status DeviceStatus Colors the icon: neutral when OK, amber or red for a problem.
static string CategoryText(DeviceCategory category)

The category in words: “Camera”, “I/O module”.

static string IconKey(DeviceCategory category)

The theme geometry key of a category, without “Icon.”: “device.camera”.

static bool IsWarning(DeviceStatus status)

Amber for a device that needs attention.

static string? StatusMessage(DeviceStatus status)

The hover text: the reason for a device that needs attention, else null.