Hello Patrick,
You can change cursor over the button in your custom IconListViewVisualItem by using the MouseMove event. You should override the OnMouseMove event as well in order to reset the cursor and turn it back to the arrow for the other elements. Please refer to the following code snippet which demonstrates this approach:
public class MyCustomIconListViewVisualItem : IconListViewVisualItem
{
protected override Type ThemeEffectiveType
{
get
{
return typeof(IconListViewVisualItem);
}
}
RadButtonElement buttonElement = new RadButtonElement();
StackLayoutElement stack = new StackLayoutElement();
protected override void CreateChildElements()
{
base.CreateChildElements();
this.buttonElement.MouseMove += ButtonElement_MouseMove;
stack.Orientation = Orientation.Vertical;
stack.Children.Add(buttonElement);
this.Children.Add(stack);
}
private void ButtonElement_MouseMove(object sender, MouseEventArgs e)
{
this.ElementTree.Control.Cursor = Cursors.Hand;
}
protected override void SynchronizeProperties()
{
base.SynchronizeProperties();
this.Text = string.Empty;
this.buttonElement.Text = this.Data.Text;
}
protected override void OnMouseMove(MouseEventArgs e)
{
base.OnMouseMove(e);
this.ElementTree.Control.Cursor = Cursors.Arrow;
}
}
I hope this helps. Should you have any other questions, I will be glad to help.
Regards,
Nadya
Progress Telerik
Get
quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.
Learn More.