This is a migrated thread and some comments may be shown as answers.

Start ripple animation from code

4 Answers 19 Views
Panorama
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 1
Patrick asked on 01 Nov 2018, 02:53 PM

Hello,

I have a custom RadTileElement where the ripple animation is enabled.

The animation works when clicking the tile element, but is it possible to raise/start the ripple animation from code?

This to draw the attention of the user to the tile element.

Grtz Patrick Vossen

4 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 02 Nov 2018, 11:53 AM
Hello, Patrick, 

The ripple animation is designed to be performed when you click an item with the mouse. However, you can simulate clicking with the mouse over a specific location on the tile element by using reflection: 

public RadForm1()
{
    InitializeComponent();
 
    this.radTileElement1.EnableRippleAnimation = true;
}
 
private void radButton1_Click(object sender, EventArgs e)
{
    this.radTileElement1.EnableRippleAnimation = true;
    MethodInfo mi = typeof(RadItem).GetMethod("StartRippleAnimation", BindingFlags.Instance | BindingFlags.NonPublic);
    MouseEventArgs args = new MouseEventArgs(System.Windows.Forms.MouseButtons.Left, 1,
        this.radTileElement1.Location.X + this.radTileElement1.Size.Width / 2,
        this.radTileElement1.Location.Y + this.radTileElement1.Size.Height / 2,1);

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

 Regards,
Dess | Tech Support Engineer, Sr.
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.
0
Patrick
Top achievements
Rank 1
answered on 02 Nov 2018, 03:57 PM

Hi Dess,

 

Thanks for your response.

Is the code complete?

If I read the code, only variables are created..

 

Regards,

Patrick Vossen

0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 05 Nov 2018, 02:08 PM
Hello, Patrick, 

If you refer to the provided code snippet in my previous post, you will notice that via reflection the StartRippleAnimation method is invoked. I have attached my sample project for your reference. It is just necessary to click the button.

I hope this information helps.

 Regards,
Dess | Tech Support Engineer, Sr.
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.
0
Patrick
Top achievements
Rank 1
answered on 08 Nov 2018, 12:09 PM

Hi Dess,

Thanks for the answer and sample project.

Ik works like a charm.

Grtz Patrick

Tags
Panorama
Asked by
Patrick
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Patrick
Top achievements
Rank 1
Share this question
or