File tree Expand file tree Collapse file tree 1 file changed +20
-12
lines changed Expand file tree Collapse file tree 1 file changed +20
-12
lines changed Original file line number Diff line number Diff line change @@ -15,19 +15,27 @@ The Window for Blazor can be modal so that the user is unable to interact with t
15
15
To make a modal window, set its ` Modal ` property to ` true ` .
16
16
17
17
```` CSHTML
18
- <TelerikWindow Modal="true" Visible="true">
19
- <WindowTitle>
20
- <strong>The Title</strong>
21
- </WindowTitle>
22
- <WindowContent>
23
- I am modal so the page behind me is not available to the user.
24
- </WindowContent>
25
- <WindowActions>
26
- <WindowAction Name="Minimize" />
27
- <WindowAction Name="Maximize" />
28
- <WindowAction Name="Close" />
29
- </WindowActions>
18
+ @* Open and close a modal window *@
19
+
20
+ <TelerikWindow Modal="true" @bind-Visible="@isModalVisible">
21
+ <WindowTitle>
22
+ <strong>The Title</strong>
23
+ </WindowTitle>
24
+ <WindowContent>
25
+ I am modal so the page behind me is not available to the user.
26
+ </WindowContent>
27
+ <WindowActions>
28
+ <WindowAction Name="Minimize" />
29
+ <WindowAction Name="Maximize" />
30
+ <WindowAction Name="Close" />
31
+ </WindowActions>
30
32
</TelerikWindow>
33
+
34
+ <TelerikButton OnClick="@( _ => isModalVisible = true )">Open the window</TelerikButton>
35
+
36
+ @code{
37
+ bool isModalVisible { get; set; } = true;
38
+ }
31
39
````
32
40
33
41
> note A modal window is centered.
You can’t perform that action at this time.
0 commit comments