From 2402bc644a36824813e7617f1a531fdc3538aa40 Mon Sep 17 00:00:00 2001 From: Nadezhda Tacheva Date: Mon, 8 Jan 2024 12:32:03 +0200 Subject: [PATCH 1/3] chore(window): list specifics for using a custom icon for a built-in action --- components/window/actions.md | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/components/window/actions.md b/components/window/actions.md index a25f233e9f..78e4ee5c84 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 - the Window will override it and use the default SVG 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(); From b6a5f3cf8c1cac6c52b694ef997febf7c5ed6312 Mon Sep 17 00:00:00 2001 From: Nadezhda Tacheva <73842592+ntacheva@users.noreply.github.com> Date: Wed, 10 Jan 2024 18:40:05 +0200 Subject: [PATCH 2/3] Update components/window/actions.md Co-authored-by: Radko Stanev <49035696+radkostanev@users.noreply.github.com> --- components/window/actions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/window/actions.md b/components/window/actions.md index 78e4ee5c84..3dc0a9f270 100644 --- a/components/window/actions.md +++ b/components/window/actions.md @@ -65,7 +65,7 @@ Action buttons expose the following properties: } ```` ->Setting a custom icon for a built-in action is not supported - the Window will override it and use the default SVG 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. +>Setting a custom icon for a built-in action is not supported - 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 From 06db8918d77037f3136dcae3136f135891416ac6 Mon Sep 17 00:00:00 2001 From: Nadezhda Tacheva Date: Wed, 10 Jan 2024 18:43:49 +0200 Subject: [PATCH 3/3] chore(window): address feedback --- components/window/actions.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/window/actions.md b/components/window/actions.md index 3dc0a9f270..aea0429deb 100644 --- a/components/window/actions.md +++ b/components/window/actions.md @@ -65,7 +65,7 @@ Action buttons expose the following properties: } ```` ->Setting a custom icon for a built-in action is not supported - 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. +>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 @@ -80,8 +80,8 @@ Custom actions can call C# directly - - + + @result