This repository includes responsive UI Templates for the most popular UI/UX patterns in web LOB applications. The UI Templates have responsive layouts with DevExtreme ASP.NET Core UI controls.
Note that the components use sample data entities without any business logic. You can use these UI Templates in your project and adapt them to your specific business requirements.
DevExtreme UI Template Gallery is released as a MIT-licensed (free and open-source) add-on to DevExtreme.
Familiarize yourself with the DevExtreme License. Free trial is available!.
The UI Template Gallery includes the following templates:
- Task List. A task/project management layout with a list, kanban board, and a gantt view. Allows you to add, edit, delete, view, search, and analyze tasks. Includes:
- User Profile. An editing form for a user's profile. Includes:
- Sign In Form.
- Register Form.
- Reset Password Form.
- Clone this repository.
- Open the solution in Visual Studio 2022 or later.
- Check Nuget.config. If DevExpress Local Nuget Feed is missing, get the key here and update Nuget.config.
- Run the project (
F5).
- Clone this repository.
- Open the project folder in an IDE that supports
.NET(e.g. Visual Studio Code). - Get the key here and update Nuget.config.
- If .NET SDK is absent, download and install it first (link).
- Run
dotnet runin the terminal from the project root folder.
- Controllers: Contains actions connected to Views.
- Views: Contains layout pages.
- Auth: Authorization-related forms.
- Shared: Root layout logic.
- Other folders match the names of individual views.
- Models: Contains application data models.
- DAL and Services: Data processing logic.
- Utils: Helper methods for common tasks.
- src: Client-side code. This folder mirrors structure of views and layouts.
- NPM manages client libraries: jQuery and DevExtreme.
- Styles are written in SCSS.
- Client logic is written in TypeScript.
Run F5 to start MSBuild. It will execute the following build steps:
- Node.js check and NPM package restore.
- Required jQuery/DevExtreme assets (scripts, icons, fonts) copied from
node_modulestowwwrootbyCopyTask. - SCSS files compiled to CSS by
AspNetCore.SassCompiler. Output sent towwwroot. You can change this configuration inappsettings.json. - TypeScript compiled to JavaScript by
Microsoft.TypeScript.MSBuild. Results sent towwwroot.
To include extra third-party client resources:
- Install the packages using NPM.
- Add assets to the
CopyTask.
The application layout combines a top toolbar, left navigation menu, and the main content view.
- Navigation menu is grouped. If you click an item, the corresponding view loads in content area.
- Views may have unique style and script files for modularity and customization.
Add TypeScript script to a view:
- Create
myview.tsinsrc/ts/views. - Link the resulting
myview.jsfile in the view markup.
<script src="~/js/views/myview.js"></script>Add SCSS to a view:
- Create
myview.scssinsrc/scss/views. - Link the resulting
myview.cssfile in the view markup.
<link href="~/css/views/myview.css" rel="stylesheet" />Navigation between views is handled by a custom router. It supports both full page reload and single-page dynamic updates.
-
Layout Check
- If target view Layout differs from the current view Layout, the router performs a full page reload.
- If Layouts match, the router dynamically replaces only the content, preserving header, footer, and navigation menu.
-
URL Handling
- The router uses the
pushStatemethod andpopstateevent to modify and track browser history. - When you navigate through pages, the router:
- Calls
pushStateto add the target URL. - Loads the target page content.
- Compares the Layout of the current and target pages using custom
data-target-placeholder-idattribute. - Updates only the content if Layouts match, otherwise reloads the page.
- Calls
- The router uses the
For detailed implementation, refer to router.ts.
-
Partial Updates
_LayoutPartial.cshtmlis used to send partial updates from the server.- This logic is defined in
_ViewStart.cshtml.
-
Authentication Views
- The
_ViewStart.cshtmlfile includes additional Layout selection logic. - Authentication views can be displayed either in the main Layout or a specific Layout displayed when users log out.
- The
The application supports themes for a consistent look and feel across all views.
- Themes are managed using SCSS variables defined in the scss folder.
- Themes can be switched dynamically at runtime.
- To customize or extend themes, modify the SCSS files in the
cssorscssdirectories. - The theme selection can be persisted for each user. For more details, refer to theme.ts.
- To add a new theme, create a new SCSS file with your color and style overrides and include it in the build process.
The application uses Entity Framework Core to manage data.
- Data is fetched from the DevExpress remote data service and stored in a SQLite database file. For details, see DemoDataFetcher.cs.
- For demonstration purposes, a per-user cache is implemented: SessionDbContextMiddleware.cs.
- First-time user connection triggers SQLite to clone in server memory.
- Only the user accesses their database copy, which is erased after a period of inactivity to free memory.
- LocalDemoDataContext contains in-memory static data for demo purposes.
- DemoDbContext lists entities used across views.
You can learn more about the ASP.NET Core controls in DevExpress documentation:
The client-side API is based on jQuery documentation and is described in the following help topics:
Need help? Submit a ticket to the DevExpress Support Center.
