-
Notifications
You must be signed in to change notification settings - Fork 351
/
Copy pathInteractiveApp.razor
43 lines (33 loc) · 1.2 KB
/
InteractiveApp.razor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
@page "/interactive-app"
<h1>Interactive App</h1>
<Notes PageInteractivity="interactive (inherited)" AppInteractivity="interactive">
<Explanation>
<strong>The logic for changing the app interactivity is in <code>App.razor</code></strong>.
</Explanation>
</Notes>
<TelerikDatePicker @bind-Value="@DatePickerValue"
Width="200px" />
<TelerikButton OnClick="@( () => WindowVisible = !WindowVisible )">Toggle Window</TelerikButton>
<TelerikWindow @bind-Visible="@WindowVisible" Width="300px" Height="200px">
<WindowTitle>Telerik Window</WindowTitle>
<WindowActions>
<WindowAction Name="Close" />
</WindowActions>
<WindowContent>
Window Content
</WindowContent>
</TelerikWindow>
<TelerikButton OnClick="@OnButtonClick">Show Dialog Directly</TelerikButton>
@code {
private DateTime DatePickerValue { get; set; } = DateTime.Today;
[CascadingParameter]
public DialogFactory? Dialogs { get; set; }
private bool WindowVisible { get; set; }
private async Task OnButtonClick()
{
if (Dialogs != null)
{
await Dialogs.AlertAsync("Telerik DialogFactory");
}
}
}