33 lines
804 B
C#
33 lines
804 B
C#
using Telerik.WinControls;
|
|
using Telerik.WinControls.UI;
|
|
|
|
namespace Pilz.UI.WinForms.Telerik.Extensions;
|
|
|
|
public static class RadListViewElementExtensions
|
|
{
|
|
public static void Clear(this RadListViewElement @this)
|
|
{
|
|
@this.Items.Clear();
|
|
@this.Groups.Clear();
|
|
}
|
|
|
|
public static void SetStatus(this RadListViewElement @this, string text)
|
|
{
|
|
@this.BeginUpdate();
|
|
@this.Clear();
|
|
@this.Items.Add(new ListViewDataItem(text));
|
|
@this.EndUpdate();
|
|
}
|
|
|
|
public static void SetStatus(this RadListViewElement @this, string text, RadSvgImage icon)
|
|
{
|
|
@this.BeginUpdate();
|
|
@this.Clear();
|
|
@this.Items.Add(new ListViewDataItem(text)
|
|
{
|
|
SvgImage = icon,
|
|
});
|
|
@this.EndUpdate();
|
|
}
|
|
}
|