Skip to content

Commit 9cf2e3b

Browse files
authored
Feature data list - preview 1 (#16)
* Added initial features for the DataList component * Set version to 0.3.0-preview1
1 parent c835d67 commit 9cf2e3b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+2682
-248
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# User-specific files (MonoDevelop/Xamarin Studio)
1313
*.userprefs
1414
.ionide/
15+
.vscode/
1516

1617
# Build results
1718
[Dd]ebug/

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
A collection of Blazor components that emulate the web forms components of the same name
44

5-
[![Build status](https://dev.azure.com/FritzAndFriends/BlazorWebFormsComponents/_apis/build/status/BlazorWebFormsComponents-.NET%20Standard-CI)](https://dev.azure.com/FritzAndFriends/BlazorWebFormsComponents/_build/latest?definitionId=14)
5+
[![Build status](https://dev.azure.com/FritzAndFriends/BlazorWebFormsComponents/_apis/build/status/BlazorWebFormsComponents-.NET%20Standard-CI)](https://dev.azure.com/FritzAndFriends/BlazorWebFormsComponents/_build/latest?definitionId=14)
6+
7+
![Nuget](https://img.shields.io/nuget/v/Fritz.BlazorWebFormsComponents?color=violet) ![Nuget (with prereleases)](https://img.shields.io/nuget/vpre/Fritz.BlazorWebFormsComponents)
68

79
## Approach + Considerations
810

@@ -18,7 +20,7 @@ There are a significant number of controls in ASP.NET Web Forms, and we will foc
1820

1921
- Data Controls
2022
- Chart(?)
21-
- DataList
23+
- [DataList](docs/DataList.md)
2224
- DataPager
2325
- DetailsView
2426
- FormView

docs/DataList.md

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# DataList
2+
3+
The DataList component is meant to emulate the asp:DataList control in markup and is defined in the [System.Web.UI.WebControls.DataList class](https://docs.microsoft.com/en-us/dotnet/api/system.web.ui.webcontrols.datalist?view=netframework-4.8)
4+
5+
[Usage Notes](#usage-notes) | [Web Forms Syntax](#web-forms-declarative-syntax) | [Blazor Syntax](#blazor-syntax)
6+
7+
## Features supported in Blazor
8+
9+
- Flow Layout
10+
- Single Column
11+
- Empty List
12+
- Table Layout
13+
- Single Column
14+
- Empty List
15+
16+
##### [Back to top](#datalist)
17+
18+
## Usage Notes
19+
20+
- The following Web Forms features are ignored
21+
- `runat="server"`
22+
- `EnableViewState`
23+
- `ID` should be converted to `@ref` if the component is referenced in code
24+
- `ItemType` MUST be defined as an attribute
25+
- `Context` should be used to define the object used in templates. If not defined, the default `<INSERT>` will be available.
26+
27+
##### [Back to top](#datalist)
28+
29+
## Web Forms Declarative Syntax
30+
31+
```html
32+
<asp:DataList
33+
AccessKey="string"
34+
BackColor="color name|#dddddd"
35+
BorderColor="color name|#dddddd"
36+
BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|Ridge|
37+
Inset|Outset"
38+
BorderWidth="size"
39+
Caption="string"
40+
CaptionAlign="NotSet|Top|Bottom|Left|Right"
41+
CellPadding="integer"
42+
CellSpacing="integer"
43+
CssClass="string"
44+
DataKeyField="string"
45+
DataMember="string"
46+
DataSource="string"
47+
DataSourceID="string"
48+
EditItemIndex="integer"
49+
Enabled="True|False"
50+
EnableTheming="True|False"
51+
EnableViewState="True|False"
52+
ExtractTemplateRows="True|False"
53+
Font-Bold="True|False"
54+
Font-Italic="True|False"
55+
Font-Names="string"
56+
Font-Overline="True|False"
57+
Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium|
58+
Large|X-Large|XX-Large"
59+
Font-Strikeout="True|False"
60+
Font-Underline="True|False"
61+
ForeColor="color name|#dddddd"
62+
GridLines="None|Horizontal|Vertical|Both"
63+
Height="size"
64+
HorizontalAlign="NotSet|Left|Center|Right|Justify"
65+
ID="string"
66+
OnCancelCommand="CancelCommand event handler"
67+
OnDataBinding="DataBinding event handler"
68+
OnDeleteCommand="DeleteCommand event handler"
69+
OnDisposed="Disposed event handler"
70+
OnEditCommand="EditCommand event handler"
71+
OnInit="Init event handler"
72+
OnItemCommand="ItemCommand event handler"
73+
OnItemCreated="ItemCreated event handler"
74+
OnItemDataBound="ItemDataBound event handler"
75+
OnLoad="Load event handler"
76+
OnPreRender="PreRender event handler"
77+
OnSelectedIndexChanged="SelectedIndexChanged event handler"
78+
OnUnload="Unload event handler"
79+
OnUpdateCommand="UpdateCommand event handler"
80+
RepeatColumns="integer"
81+
RepeatDirection="Horizontal|Vertical"
82+
RepeatLayout="Table|Flow"
83+
runat="server"
84+
SelectedIndex="integer"
85+
ShowFooter="True|False"
86+
ShowHeader="True|False"
87+
SkinID="string"
88+
Style="string"
89+
TabIndex="integer"
90+
ToolTip="string"
91+
UseAccessibleHeader="True|False"
92+
Visible="True|False"
93+
Width="size"
94+
>
95+
<AlternatingItemStyle />
96+
<AlternatingItemTemplate>
97+
<!-- child controls -->
98+
</AlternatingItemTemplate>
99+
<EditItemStyle />
100+
<EditItemTemplate>
101+
<!-- child controls -->
102+
</EditItemTemplate>
103+
<FooterStyle />
104+
<FooterTemplate>
105+
<!-- child controls -->
106+
</FooterTemplate>
107+
<HeaderStyle />
108+
<HeaderTemplate>
109+
<!-- child controls -->
110+
</HeaderTemplate>
111+
<ItemStyle />
112+
<ItemTemplate>
113+
<!-- child controls -->
114+
</ItemTemplate>
115+
<SelectedItemStyle />
116+
<SelectedItemTemplate>
117+
<!-- child controls -->
118+
</SelectedItemTemplate>
119+
<SeparatorStyle />
120+
<SeparatorTemplate>
121+
<!-- child controls -->
122+
</SeparatorTemplate>
123+
</asp:DataList>
124+
```
125+
126+
##### [Back to top](#datalist)
127+
128+
## Blazor Syntax
129+
130+
##### [Back to top](#datalist)
131+

samples/AfterBlazorClientSide/AfterBlazorClientSide.csproj

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
1-
<Project Sdk="Microsoft.NET.Sdk.Web">
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
44
<TargetFramework>netstandard2.1</TargetFramework>
55
<RazorLangVersion>3.0</RazorLangVersion>
66
</PropertyGroup>
77

8+
<ItemGroup>
9+
<Content Include="..\AfterBlazorServerSide\Pages\ComponentList.razor" Link="Pages\ComponentList.razor" />
10+
<Content Include="..\AfterBlazorServerSide\Pages\ControlSamples\**">
11+
<Link>Pages\ControlSamples\%(RecursiveDir)%(Filename)%(Extension)</Link>
12+
</Content>
13+
</ItemGroup>
14+
815
<ItemGroup>
916
<PackageReference Include="Microsoft.AspNetCore.Blazor" Version="3.1.0-preview4.19579.2" />
1017
<PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="3.1.0-preview4.19579.2" PrivateAssets="all" />

samples/AfterBlazorClientSide/Pages/ControlSamples/ListView/Index.razor

Lines changed: 0 additions & 75 deletions
This file was deleted.

samples/AfterBlazorClientSide/Pages/ControlSamples/ListView/ModelBinding.razor

Lines changed: 0 additions & 63 deletions
This file was deleted.

samples/AfterBlazorClientSide/Pages/Index.razor

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -8,48 +8,4 @@
88
that our Blazor components render appropriately.
99
</p>
1010

11-
<div class="row">
12-
13-
<div class="col-md-3">
14-
<h3>Data Controls</h3>
15-
<ul>
16-
<li>Chart(?) </li>
17-
<li>DataList </li>
18-
<li>DataPager </li>
19-
<li>DetailsView </li>
20-
<li>FormView </li>
21-
<li>GridView </li>
22-
<li><a href="/ControlSamples/ListView">ListView</a></li>
23-
<li>Repeater </li>
24-
25-
</ul>
26-
</div>
27-
28-
<div class="col-md-3">
29-
<h3>Validation Controls</h3>
30-
<ul>
31-
32-
<li>CompareValidator </li>
33-
<li>CustomValidator </li>
34-
<li>RangeValidator </li>
35-
<li>RegularExpressionValidator(?) </li>
36-
<li>RequiredFieldValidator </li>
37-
<li>ValidationSummary </li>
38-
39-
</ul>
40-
</div>
41-
42-
<div class="col-md-3">
43-
<h3>Navigation Controls</h3>
44-
<ul>
45-
</ul>
46-
</div>
47-
48-
<div class="col-md=3">
49-
<h3>Login Controls</h3>
50-
<ul>
51-
</ul>
52-
</div>
53-
54-
</div>
55-
11+
<ComponentList></ComponentList>

samples/AfterBlazorClientSide/_Imports.razor

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@
66
@using AfterBlazorClientSide
77
@using AfterBlazorClientSide.Shared
88
@using BlazorWebFormsComponents
9-
@using SharedSampleObjects.Models
9+
@using SharedSampleObjects.Models
10+
11+
@using static BlazorWebFormsComponents.Enums.RepeatLayout

0 commit comments

Comments
 (0)