@@ -91,29 +91,35 @@ You can mix custom actions with built-in actions, and you do not have to define
9191> caption Mixing built-in actions with custom actions
9292
9393```` CSHTML
94- You can define any collection of actions
94+ @* You can define any collection of actions. The second custom action shows all its features. *@
9595
9696<TelerikWindow Visible="true">
97- <WindowActions>
98- <WindowAction Name="Minimize" />
99- <WindowAction Name="MyAction" Icon="@IconName.Information" OnClick="@MyCustomActionHandler" />
100- <WindowAction Name="Maximize" />
101- </WindowActions>
102- <WindowContent>
103- @result
104- <br />
105- You can mix custom actions with the built-in ones in any order. If a custom action is used, its OnClick handler is mandatory.
106- </WindowContent>
97+ <WindowActions>
98+ <WindowAction Name="Minimize" />
99+ <WindowAction Name="MyAction" Icon="@IconName.Information" OnClick="@MyCustomActionHandler" />
100+ <WindowAction Name="Maximize" />
101+ <WindowAction Hidden="@( string.IsNullOrEmpty(result) )"
102+ Icon="@IconName.ClearCss"
103+ Name="CustomActionWithAllParameters"
104+ Title="my custom title attribute that is a tooltip when you hover the action"
105+ OnClick="@( () => result = string.Empty )" />
106+ </WindowActions>
107+ <WindowContent>
108+ @result
109+ <br />
110+ You can mix custom actions with the built-in ones in any order. If a custom action is used, its OnClick handler is mandatory.
111+ </WindowContent>
112+ <WindowTitle>Lorem ipsum</WindowTitle>
107113</TelerikWindow>
108114
109115@code {
110- string result;
111- public void MyCustomActionHandler()
112- {
113- result = "custom action button clicked on: " + DateTime.Now.ToString();
116+ string result;
117+ public void MyCustomActionHandler()
118+ {
119+ result = "custom action button clicked on: " + DateTime.Now.ToString();
114120
115- StateHasChanged();
116- }
121+ StateHasChanged();
122+ }
117123}
118124````
119125
0 commit comments