fritzandfriends / blazorwebformscomponents Goto Github PK
View Code? Open in Web Editor NEWA collection of Blazor components that emulate the ASP.NET Web Forms controls of the same name
License: MIT License
A collection of Blazor components that emulate the ASP.NET Web Forms controls of the same name
License: MIT License
We should have a live website that shows all of the samples running
For controls like ListView, there are LayoutTemplate elements that declares the outer rendering for the component. There is typically a an ItemPlaceholderId attribute that defines an element id inside the LayoutTemplate where in the LayoutTemplate the contents of the component should be inserted.
<asp:ListView ItemPlaceholderId="foo">
<LayoutTemplate>
<span id="foo"></span>
</LayoutTemplate>
</asp:ListView>
should render something like:
<span id="foo">
== LISTVIEW CONTENT ==
</span>
@csharpfritz I want to do some PRs, but till now I'm not able to restore the project packages using dotnet restore
Any guidance on that? This is first OSS project I faced this issue
Need to trigger a Delete on the DataSource when a CommandName "Delete" is triggered.
https://docs.microsoft.com/dotnet/api/system.web.ui.webcontrols.formview?view=netframework-4.8#data-operations
In order to implement ValidationGroup
and CauseValidation
, we need to get the element causing submit in EditForm
, which is not possible in blazor right now.
I opened an issue on AspNetCore repo requesting this feature. dotnet/aspnetcore#18326
If there are JavaScript methods that need to be called by name, rather than store the name in a constant in the code, would it be better to use configuration?
This would also allow the developer to call their own methods in place of the default - should they require it.
The following features need to be implemented for grouping:
Attributes:
Child Elements:
Would it be an idea to use some standard settings for the project?
This would probably need to be phased.
In the later versions of ASP.NET Web Forms, the concept of .mobile.aspx and .mobile.master pages were introduced to allow for alternative rendering of web forms that would target mobile browsers.
How should we handle this feature?
We need some concrete requirements and tests to verify that images are placed appropriately for the various ImageSets. This means the following:
In order for the ListView's databinding events to trigger and function similarly to the Web Forms version, a wrapper ListViewItem object needs to be created.
Docs for ListViewItem at: https://docs.microsoft.com/en-us/dotnet/api/system.web.ui.webcontrols.listviewitem?view=netframework-4.8
What do we do with the MasterPage object? Is there a shim that could be constructed to redirect how a Blazor component is contained?
Discussion:
A recursive TreeNode binding strategy may more easily help enable other data-models beyond XML to bind data to the TreeView.
We should add a comment to the Parameter's code docs (///) with a link to a GitHub doc with more information about how to fix the obsolete code
Add these attributes to the DataList
Add these child elements to the DataList
Browse to the DataList - HeaderStyle sample in AfterClientSide for an example
from @grleachman in #21
Attribute Value Conflicts
Adding RepeatDirection has caused a conflict with GridLines
There's now an ugly problem where the static enums require the markup to be messy:
Gridlines="Enums.GridLines.Horizontal"
RepeatDirection="Enums.RepeatDirection.Horizontal"
This is going to be painful for migration.
I just create a Gitter community named BlazorWebFormsComponents/community
@csharpfritz, I just take the initiative to create this community, hope this help for further discussion about this project
There are several features in the Page object that should be made available to the application.
When we consider converting usercontrols, master pages, and pages we also need to consider converting custom controls.
Is there a shim abstract class that we could make available that these classes that inherit from WebControl or CompositeControl could inherit from and be able to work with Blazor?
I think this may be a separate .NET Standard class library to support this goal
currently test output is generated using Console.WriteLine.
This makes for a noisy output, and slows down the dotnet watch, critically during minimal march we need to optimise the tests and avoid any unnecessary stdout.
While watching the stream I saw Fritz debate on whether to use an older style of UI with inline styling like webforms would output, or a more modern approach.
I suggested that since the output may benefit from a "Compatibility mode" switch, which would let you choose the older style for front-end JS compatibility with webform output, or a new clean style which can drop the legacy webform style.
It would be a great companion tool to have to convert ascx files to razor components - fixing any obvious name changes along the way (thinking the @context vs Item problem here)
This may sound crazy, but do we want to implement ViewState in this project?
We could consider it in the name of helping with migration and make a super simple Dictionary<string,object>
available in our components private scope that COULD provide the same features as ViewState.
We would want to mark it with an Obsolete
flag to help encourage folks to migrate from using it long-term.
Suggestion to publish a Snippet package for the static imports to anabe phau enumeration types as well as other useful markup snippets.
Another option may be an extension or project templates
I wasn't happy with the test coverage.
Having gone back to review I find it's lacking, and the behaviour still doesn't mimic the WebForms correctly specifically around ItemSeparator.
There's an interesting anomaly on groups of 7 grouped by 3 where the ItemSeparator is added after the last item twice. Not sure why this is, but presume it needs to be mimicked, and will investigate other combinations.
GroupStart
seven Widget
ItemSeparator
ItemSeparator
GroupEnd
UPDATE
Having reviewed this. I found that the anomaly was intended behaviour. for a 7 items grouped in 6 layout, there would be 6 elements in the first group with 5 separators, and 1 element in the 2nd group with still 5 separators.
7 x 6 ->
I s I s I s I s I s I G I s s s s s
We need to add some unit tests for the new validators components
This might be a stretch, but what about writing a method that uses reflection across the @context item in a template to output a property specified in the same way that Eval() worked in Web Forms?
From Web Forms: <#: Eval("EmployeeName") %>
converts to: @Eval("EmployeeName")
We have a concept for some tooling to help lint or provide build checking to ensure that C# code that calls JavaScript is referencing script that exists
When Expanded is set to false, the treeview nodes cannot be expanded properly as they immediately collapse
HeaderStyle, ItemStyle, etc parameter elements should not need a ChildContents container to be represented.
I'll take this one!
Watching your stream, you mentioned people might have some javascript which depends on the html that webforms is creating. Does that mean that we should render the ID property in the html?
In Web Forms, you were able to set attribute values for colors to either a color name or to an HTML hex color representation. In our components, you're forced in a Color object
Using a Treeview can have some negative effects on accessibility users. From a personal point of view when using speech recognition.
It is very hard to move the mouse to a certain point to expand a node, especially when it is so small.
If a Treeview is used it would be helpful to have a search text box that will filter the nodes below. Also the arrow keys should work for moving around in the Treeview and expanding the nodes.
A Treeview is not very good for touch centric devices as generally the expand touch area is very small.
Also drop-down menus can have problems from a speech recognition point of view. At the very least they need to have something to indicate they drop-down.
When things only happen when a mouse hovers over something, it can be very difficult to discover this!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.