-
Notifications
You must be signed in to change notification settings - Fork 101
Expand file tree
/
Copy pathWheelExample1.razor
More file actions
51 lines (45 loc) · 2 KB
/
WheelExample1.razor
File metadata and controls
51 lines (45 loc) · 2 KB
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
44
45
46
47
48
49
50
51
@namespace MudExtensions.Docs.Examples
@inject ISnackbar Snackbar
<MudGrid Class="cursor-default">
<MudItem xs="12" sm="8" Class="d-flex">
<MudWheel T="int" ItemCollection="_numbers" @bind-Value="_val" WheelLevel="_wheelLevel" Dense="_dense" SmoothBorders="_smoothBorders" Color="_color" />
<MudWheel T="string" ItemCollection="_letterNumbers" WheelLevel="_wheelLevel" Dense="_dense" SmoothBorders="_smoothBorders" Color="_color" />
</MudItem>
<MudItem xs="12" sm="4">
<MudStack Spacing="4">
<MudNumericField @bind-Value="_val" Label="Value (First MudWheel)" Min="0" Max="5000000" HelperText="Between 0 and 5.000.000" />
<MudNumericField @bind-Value="_wheelLevel" Label="Wheel Level" />
<MudSwitchM3 @bind-Value="_dense" Color="Color.Secondary" Label="Dense" />
<MudSwitchM3 @bind-Value="_smoothBorders" Color="Color.Secondary" Label="Smooth Borders" />
<MudSelect @bind-Value="_color" Variant="Variant.Outlined" Label="Color">
@foreach (Color item in Enum.GetValues<Color>())
{
<MudSelectItem Value="item">@item.ToDescriptionString()</MudSelectItem>
}
</MudSelect>
</MudStack>
</MudItem>
</MudGrid>
@code {
int _wheelLevel = 2;
List<int> _numbers = new();
List<string> _letterNumbers = new() { "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten" };
int _val = 9;
bool _dense;
bool _smoothBorders = false;
Color _color = Color.Default;
List<WheelDocClass> _customObject = new() { new WheelDocClass() { Number = 1, Name = "Mary" }, new WheelDocClass() { Number = 2, Name = "John" } };
protected override void OnInitialized()
{
base.OnInitialized();
for (int i = 0; i <= 5000000; i++)
{
_numbers.Add(i);
}
}
public class WheelDocClass
{
public int Number { get; set; }
public string? Name { get; set; }
}
}