diff --git a/components/window/actions.md b/components/window/actions.md index a25f233e9f..aea0429deb 100644 --- a/components/window/actions.md +++ b/components/window/actions.md @@ -65,6 +65,7 @@ Action buttons expose the following properties: } ```` +>Setting a custom icon for a built-in action is not supported as the Window will override it and use the default icon for the corresponding built-in action. If you need to specify a custom icon, use a [custom action](#custom-actions) instead of the built-in one. ## Custom Actions @@ -75,9 +76,12 @@ You can create a custom action icon and you must provide its `OnClick` handler. ````CSHTML Custom actions can call C# directly - + + + - + + @result @@ -86,9 +90,17 @@ Custom actions can call C# directly +@if (!WindowVisible) +{ + Show the Window +} + @code { - string result; - public void MyCustomActionHandler() + private bool WindowVisible { get; set; } = true; + + private string result; + + private void MyCustomActionHandler() { result = "custom action button clicked on: " + DateTime.Now.ToString();