Last Updated: 02 Feb 2021 10:57 by ADMIN
Created on: 02 Feb 2021 10:56
Category: Window
Type: Feature Request
Fire OnClick for built-in actions before the built-in action


admin edit

At the moment this is not guaranteed and if you want to customize the behavior you should use a custom action to get the OnClick handler, and control the window through its parameters.

Here is an example of implementing a custom close button that also fires an event:


<TelerikWindow Visible="@IsWindowVisible" Modal="true" Centered="true">
        lorem ipsum
        <WindowAction Name="MyCustomAction" Icon="close" OnClick="@HandleCancel" />

    bool IsWindowVisible { get; set; } = true;

    async Task HandleCancel()
        Console.WriteLine("my custom click happened");
        IsWindowVisible = false;//hide the window with your own code if you also want to do that