This repository contains responsive UI Templates that replicate popular UI/UX patterns for web-based Line-of-Business applications. DevExtreme UI Templates deliver responsive layouts using DevExtreme ASP.NET Core UI controls.
Note that components use auto-generated data. You can use these UI Templates in your project and modify them based on your business requirements.
DevExtreme UI Template Gallery is released as a MIT-licensed (free and open-source) add-on to DevExtreme. Get your 30-day free trial now!
Refer to the following page for additional information on DevExtreme Licensing: Pricing, Compare Subscriptions.
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. This template includes:
- User Profile. A form used to edit user profile. This template includes:
- Sign In Form.
- Register Form.
- Reset Password Form.
- Clone this repository.
- Open the solution in Visual Studio 2022 or later.
- If DevExpress Local Nuget feed did not restore automatically, get the key and update the Nuget.config file.
- 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 and update the Nuget.config file.
- If .NET SDK if necessary (download).
- Run the
dotnet runcommand in 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: Implement data processing logic.
- Utils: Helper methods for common tasks.
- src: Client-side code. This folder mirrors the 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. This will execute the following build steps:
- Check Node.js and restore NPM packages
- Copy required jQuery/DevExtreme assets (scripts, icons, fonts) from
node_modulestowwwroot. - Compile SCSS files to CSS via
AspNetCore.SassCompiler. The output file is created in thewwwrootfolder. You can change the target folder inappsettings.json. - Compile TypeScript to JavaScript via
Microsoft.TypeScript.MSBuild. The output script is created inwwwroot.
To add extra third-party client resources:
- Install packages using NPM.
- Add assets to the
CopyTask.
The application layout contains a top toolbar, left navigation menu, and a main content view.
- Navigation menu is grouped. If you click an item, the corresponding view appears in the content area.
- Views may include unique style and script files used 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 a target view Layout differs from the current view Layout, the router performs a full page reload.
- If Layouts match, the router dynamically replaces content, preserving header, footer, and navigation menu.
-
URL Handling
- The router calls the
pushStatemethod and thepopstateevent to modify and track browser history. - When you navigate through pages, the router:
- Calls
pushStateto add the target URL. - Loads target page content.
- Compares Layouts for current and target pages using custom
data-target-placeholder-idattribute. - Updates content if Layouts match, otherwise, reloads the page.
- Calls
- The router calls the
For implementation details, refer to the following file: router.ts.
-
Partial Updates
_LayoutPartial.cshtmlis used to send partial updates from the server.- The logic that selects between
_LayoutPartialand_Layoutis 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 & 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 SCSS files in the
cssorscssdirectories. - Theme selection can be persisted for each user. For additional information in this regard, refer to the following file: 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 an SQLite database file (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 can access their database copy. This copy 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.
To learn more about DevExpress ASP.NET Core controls, please review the following:
Client-side APIs are based on jQuery and are described in the following help topics:
Need help? Submit a ticket to the DevExpress Support Center.
