Skip to content

Commit 833a305

Browse files
committed
1.2.1.1
1 parent 3abc98b commit 833a305

4 files changed

Lines changed: 79 additions & 2 deletions

File tree

-88.8 KB
Binary file not shown.
89.1 KB
Binary file not shown.

Blazor.WebForm.Components/Blazor.WebForm.Components.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<TargetFramework>net5.0</TargetFramework>
55
<SignAssembly>true</SignAssembly>
66
<AssemblyOriginatorKeyFile>Blazor.WebForm.Components.pfx</AssemblyOriginatorKeyFile>
7-
<Version>1.2.1.0</Version>
7+
<Version>1.2.1.1</Version>
88
<RootNamespace>asp</RootNamespace>
99
<Copyright>Jurio li</Copyright>
1010
<AssemblyName>Blazor.WebForm.Components</AssemblyName>
@@ -17,7 +17,7 @@
1717

1818
<ItemGroup>
1919
<PackageReference Include="Applied" Version="1.2.1.6" />
20-
<PackageReference Include="Blazor.WebForm.UI" Version="1.2.1" />
20+
<PackageReference Include="Blazor.WebForm.UI" Version="1.2.1.1" />
2121
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="5.0.11" />
2222
</ItemGroup>
2323

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
@using Blazor.WebForm.UI
2+
@using Blazor.WebForm.UI.ControlComponents
3+
@using System.Web.UI
4+
@using System.Web.UI.WebControls
5+
@inherits ListControlComponent<System.Web.UI.WebControls.ComboBox>
6+
@this.RenderWithCascading(this.Control, this.ChildContent)
7+
@code {
8+
[Parameter]
9+
public RenderFragment ChildContent { get; set; }
10+
11+
[Parameter]
12+
public string Text
13+
{
14+
get
15+
{
16+
return this.Control.Text;
17+
}
18+
set
19+
{
20+
this.Control.Text = value;
21+
}
22+
}
23+
24+
[Parameter]
25+
public bool ReadOnly
26+
{
27+
get
28+
{
29+
return this.Control.ReadOnly;
30+
}
31+
set
32+
{
33+
this.Control.ReadOnly = value;
34+
}
35+
}
36+
37+
[Parameter]
38+
public int MaxLength
39+
{
40+
get
41+
{
42+
return this.Control.MaxLength;
43+
}
44+
set
45+
{
46+
this.Control.MaxLength = value;
47+
}
48+
}
49+
50+
[Parameter]
51+
public int Columns
52+
{
53+
get
54+
{
55+
return this.Control.Columns;
56+
}
57+
set
58+
{
59+
this.Control.Columns = value;
60+
}
61+
}
62+
63+
protected override void OnInitialized()
64+
{
65+
base.OnInitialized();
66+
if (this.HasPropertyBindEvent<string>(nameof(this.Text)))
67+
{
68+
this.Control.AutoPostBack = true;
69+
this.Control.TextChanged += this.BindTextChanged;
70+
}
71+
}
72+
73+
private void BindTextChanged(object sender, EventArgs e)
74+
{
75+
this.InvokePropertyBindEvent(nameof(this.Text), this.Text);
76+
}
77+
}

0 commit comments

Comments
 (0)