SafeDispatch/Safedispatch_4_0/maptab/UIClasses/CustomGroupExpander.cs

58 lines
1.7 KiB
C#
Raw Permalink Normal View History

2024-02-22 16:43:59 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SafeMobileLib;
using Telerik.WinControls.UI;
namespace Dispatcher.maptab.UIClasses
{
public class CustomGroupExpander : GridGroupExpanderCellElement
{
private LightVisualElement label;
private StackLayoutElement stackLayout;
public CustomGroupExpander(GridViewColumn col, GridRowElement row)
: base(col, row)
{
}
protected override void UpdateInfoCore()
{
base.UpdateInfoCore();
this.label.Text = this.RowElement.RowInfo.ChildRows.Count.ToString();
}
protected override void CreateChildElements()
{
base.CreateChildElements();
this.Size = new System.Drawing.Size(50, 50);
this.Children.Remove(this.Expander);
this.Expander.Image = Utils.ScaleImage(global::Dispatcher.Properties.Resources.i_assigned, 32, 32);
this.Expander.ImageAlignment = System.Drawing.ContentAlignment.MiddleCenter;
this.label = new LightVisualElement();
this.label.DrawFill = false;
this.label.DrawText = true;
this.stackLayout = new StackLayoutElement();
this.stackLayout.StretchVertically = true;
this.stackLayout.Children.Add(this.Expander);
//this.stackLayout.Children.Add(this.label);
this.Children.Add(this.stackLayout);
}
protected override Type ThemeEffectiveType
{
get
{
return typeof(GridGroupExpanderCellElement);
}
}
}
}