---
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">
<WindowTitle>WindowTitle</WindowTitle>
<WindowContent>
lorem ipsum
</WindowContent>
<WindowActions>
<WindowAction Name="MyCustomAction" Icon="close" OnClick="@HandleCancel" />
</WindowActions>
</TelerikWindow>
@code{
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
}
}
---