Git Product home page Git Product logo

bubdm / wpfcrudcontrol Goto Github PK

View Code? Open in Web Editor NEW

This project forked from genericcodes/wpfcrudcontrol

0.0 0.0 0.0 2.7 MB

A generic WPF CrudControl implemented based on the MVVM pattern. The control abstracts both the UI and business logic to achieve a foundation for a complete CRUD operation implementation (Add, Edit, Delete, Listing with sorting, paging and searching).

License: MIT License

C# 91.03% PowerShell 8.97%

wpfcrudcontrol's Introduction

WPFCrudControl

A generic WPF CrudControl implemented based on the MVVM pattern. The control abstracts both the UI and business logic to achieve a foundation for a complete CRUD operation implementation (Add, Edit, Delete, Listing with sorting, paging and searching).

The Result

![alt text](https://cloud.githubusercontent.com/assets/20560529/20644314/ec3c0a98-b438-11e6-9fad-3d7f4b1747d7.png)

Xaml usage

<crud:GenericCRUDControl>
    <crud:GenericCRUDControl.SortingProperties>
        <crud:SortingProperty DisplayName="Product Name" PropertyPath="ProductName">
        </crud:SortingProperty>
        <crud:SortingProperty DisplayName="Category" PropertyPath="Category.CategoryName">
        </crud:SortingProperty>
        <crud:SortingProperty DisplayName="Supplier" PropertyPath="Supplier.ContactName">
        </crud:SortingProperty>
    </crud:GenericCRUDControl.SortingProperties>
    <crud:GenericCRUDControl.Columns>
        <crud:CustomDataGridColumn Header="Category Name" BindingExpression="Category.CategoryName">
        </crud:CustomDataGridColumn>
        <crud:CustomDataGridColumn Header="Product Name" BindingExpression="ProductName">
        </crud:CustomDataGridColumn>
        <crud:CustomDataGridColumn ColumnType="TemplateColumn" Header="Stock">
            <crud:CustomDataGridColumn.DataGridColumnTemplate>
                <DataTemplate>
                    <ProgressBar Maximum="150" Value="{Binding UnitsInStock}"></ProgressBar>
                </DataTemplate>
            </crud:CustomDataGridColumn.DataGridColumnTemplate>
        </crud:CustomDataGridColumn>
        <crud:CustomDataGridColumn Header="Supplier Name" 
         BindingExpression="Supplier.ContactName" Width="*"></crud:CustomDataGridColumn>
    </crud:GenericCRUDControl.Columns>
</crud:GenericCRUDControl>

Getting Started

Installation using Nuget 

WPF CrudControl is available on NuGet, you can install it using nuget manager or run the following command in the package manager console.

PM> Install-Package WPFCRUDControl

For the getting-started details got to the CodeProject Article

Solution Design

generic crud For the solution design details got to the CodeProject Article

Northwind Demo

The solution is applied on Northwind database for two modules Suppliers and Products. In the demo, we used Unity as a IoC/DI container, MVVMLight toolkit and WPF Modern UI library for styling the main window and navigation.

To run the demo:

  • Restore packages using NuGet packages manager
  • Install SQL Server LocalDB

wpfcrudcontrol's People

Contributors

genericcodes avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.