forked from syncfusion/blazor-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMultiline.razor
More file actions
123 lines (107 loc) · 3.67 KB
/
Multiline.razor
File metadata and controls
123 lines (107 loc) · 3.67 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
@page "/TextBox/Multiline"
@using Syncfusion.EJ2.Blazor.Inputs
@using Syncfusion.EJ2.Blazor.Buttons
@using Syncfusion.EJ2.Blazor.DropDowns
@inherits SampleBaseComponent;
<div class="control-section col-lg-12 multiline">
<div class="col-lg-8">
<div class='content wrapper'>
<EjsTextBox Placeholder="Enter your address" Enabled="@checkDisabled" Readonly="@checkReadonly" FloatLabelType="@FloatLabel" Multiline="true"></EjsTextBox>
</div>
</div>
<div class="col-lg-4">
<div class='content property-section'>
<div class="property">Properties</div>
<table>
<tbody>
<tr>
<td>
<div class="selectionText">Float Label Type </div>
</td>
<td>
<div>
<EjsDropDownList TValue="string" TItem="FloatTypes" DataSource="@Data" Index="0">
<DropDownListEvents TValue="string" ValueChange="OnChangeLabelType"></DropDownListEvents>
<DropDownListFieldSettings Text="Text" Value="ID"></DropDownListFieldSettings>
</EjsDropDownList>
</div>
</td>
</tr>
<tr>
<td>
<div class="selectionText">Disabled </div>
</td>
<td>
<div>
<EjsCheckBox ValueChange="OnEnabledChange"></EjsCheckBox>
</div>
</td>
</tr>
<tr>
<td>
<div class="selectionText">Read only</div>
</td>
<td>
<div>
<EjsCheckBox ValueChange="OnReadonlyChange"></EjsCheckBox>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
@code{
public FloatLabelType FloatLabel { get; set; } = FloatLabelType.Auto;
private bool checkDisabled { get; set; } = true;
private bool checkReadonly { get; set; } = false;
public class FloatTypes
{
public string ID { get; set; }
public string Text { get; set; }
}
private List<FloatTypes> Data = new List<FloatTypes>() {
new FloatTypes(){ ID= "Auto", Text= "Auto" },
new FloatTypes(){ ID= "Always", Text= "Always" }
};
public void OnChangeLabelType(Syncfusion.EJ2.Blazor.DropDowns.ChangeEventArgs<string> args)
{
this.FloatLabel = (FloatLabelType)Enum.Parse(typeof(FloatLabelType), (args.Value));
}
public void OnEnabledChange(Syncfusion.EJ2.Blazor.Buttons.ChangeEventArgs args)
{
this.checkDisabled = !args.Checked;
}
public void OnReadonlyChange(Syncfusion.EJ2.Blazor.Buttons.ChangeEventArgs args)
{
this.checkReadonly = args.Checked;
}
}
<style>
.control-section.multiline {
margin-top: 20px;
}
.wrapper {
width: 45%;
margin-left: 200px;
}
.selectionText {
margin: 10px;
width: 100px;
font-size: 13px;
}
.apply-limit {
margin-top: 10px;
}
.control-label {
padding: 24px 0px 10px 0px;
font-size: 12px;
}
.property {
padding-left: 10px;
padding-bottom: 20px;
font-weight: 600;
font-size: 15px;
}
</style>