{"id":20054221,"url":"https://github.com/usercode/wpf.dataforms","last_synced_at":"2026-05-13T04:05:21.642Z","repository":{"id":109494282,"uuid":"143869540","full_name":"usercode/WPF.DataForms","owner":"usercode","description":"Fluent-based data forms for WPF","archived":false,"fork":false,"pushed_at":"2022-12-29T20:32:49.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-02T09:17:53.242Z","etag":null,"topics":["wpf"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/usercode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-07T12:23:09.000Z","updated_at":"2018-12-25T15:49:50.000Z","dependencies_parsed_at":"2023-05-20T23:30:41.658Z","dependency_job_id":null,"html_url":"https://github.com/usercode/WPF.DataForms","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usercode%2FWPF.DataForms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usercode%2FWPF.DataForms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usercode%2FWPF.DataForms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usercode%2FWPF.DataForms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/usercode","download_url":"https://codeload.github.com/usercode/WPF.DataForms/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241482100,"owners_count":19969850,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["wpf"],"created_at":"2024-11-13T12:39:22.132Z","updated_at":"2025-11-28T04:03:55.720Z","avatar_url":"https://github.com/usercode.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WPF.DataForms\nFluent-based data forms for WPF\n\nhttps://www.nuget.org/packages/WPF.DataForms\n\n[![nuget](https://img.shields.io/nuget/v/WPF.DataForms.svg)](https://www.nuget.org/packages/WPF.DataForms)\n\n## General ##\n\n- Every form has groups and fields\n- Every form has three states (view, create and edit)\n- Every field create different controls depended by state\n  - View state: e.g. some controls are just disabled or replaced by non-editable controls.\n- Automatic grid layout\n  - add or move fields and groups without setting the row and column number\n- Easily replace controls without changing mappings\n\n## How to use it ##\n\n\n1. Create the entity detail viewmodel\n\n```CS\nclass CustomerDetailViewModel\n    {\n        public Customer Customer { get; set; }\n        \n        public DataTemplate DataTemplate { get; set; }\n        \n        //..\n    }\n```\n\n2. Create the entity detail view and set the data context to the viewmodel instance.\n\n```XAML\n\u003cContentControl Content=\"{Binding}\"\n                ContentTemplate=\"{Binding DataTemplate}\"\n/\u003e\n```\n\n3. Define the mapping for viewmodel\n\n```CS\nclass CustomerFormMapping : DataFormMapping\u003cCustomerDetailViewModel\u003e\n    {\n        public override void CreateContent()\n        {\n            MainContent.Group(Resources.General)\n                          .Id(Resources.Id, x =\u003e x.Customer.Id)\n                          .Bool(Resources.IsActive, x =\u003e x.Customer.IsActive)\n                          .Text(Resources.Title, x =\u003e x.Customer.Title)\n                          .Text(Resources.LastName, x =\u003e x.Customer.Lastname)\n                          .Text(Resources.FirstName, x =\u003e x.Customer.Firstname)\n                          .Date(Resources.DateOfBirth, x =\u003e x.Customer.DOB)\n              ;\n        }\n```\n\n4. Create the data template:\n\n```CS\nviewModel.DataTemplate = new CustomerFormMapping ().CreateTemplate(FormState.View);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusercode%2Fwpf.dataforms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusercode%2Fwpf.dataforms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusercode%2Fwpf.dataforms/lists"}