Hi,
1) I have a custom grid column/cell based on the examples
protected
override
void
CreateChildElements()
{
base
.CreateChildElements();
this
._stackElement =
new
StackLayoutElement();
this
._stackElement.StretchHorizontally =
true
;
this
._stackElement.StretchVertically =
true
;
this
._textElement =
new
LightVisualElement();
this
._textElement.StretchHorizontally =
true
;
this
._textElement.StretchVertically =
true
;
//this._textElement.Padding = new Padding(0, 0, 5, 0);
this
._imageElement =
new
LightVisualElement();
this
._imageElement.ImageAlignment = System.Drawing.ContentAlignment.MiddleRight;
this
._imageElement.ImageLayout = ImageLayout.Center;
this
._imageElement.Size =
this
._imageElement.MaxSize =
new
System.Drawing.Size(20, 20);
this
._imageElement.StretchHorizontally =
false
;
this
._imageElement.StretchVertically =
true
;
this
._imageElement.Click += (o, e) =>
{
if
(
this
.Enabled)
...
};
_stackElement.Children.Add(_textElement);
_stackElement.Children.Add(_imageElement);
this
.Children.Add(_stackElement);
}
Now the problem is, the sender in the grid OnToolTipTextNeeded is the LightVisualElement from the textElement/imageElement and not the cell it self (compared to the other "normal" columns)
I know that I get the cell over the Parent.Parent from the LightVisualElement but is there a simpler / more generic way?
2) Also is with the StackLayoutElement, is there any way that the image element would be the last to hide if the column width is to small (see attached images)