{"id":17008850,"url":"https://github.com/i-e-b/dynamicpropertyobject","last_synced_at":"2025-04-19T18:13:09.769Z","repository":{"id":139825010,"uuid":"112317699","full_name":"i-e-b/DynamicPropertyObject","owner":"i-e-b","description":"A tool to drive WinForms PropertyGrid from dynamic data","archived":false,"fork":false,"pushed_at":"2017-11-28T15:26:26.000Z","size":21,"stargazers_count":5,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T11:34:31.607Z","etag":null,"topics":["old","working"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/i-e-b.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":"2017-11-28T09:55:44.000Z","updated_at":"2024-06-10T11:37:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"371135b6-d26b-4a10-800a-a9b9662e679d","html_url":"https://github.com/i-e-b/DynamicPropertyObject","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/i-e-b%2FDynamicPropertyObject","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i-e-b%2FDynamicPropertyObject/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i-e-b%2FDynamicPropertyObject/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i-e-b%2FDynamicPropertyObject/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/i-e-b","download_url":"https://codeload.github.com/i-e-b/DynamicPropertyObject/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249760150,"owners_count":21321843,"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":["old","working"],"created_at":"2024-10-14T05:29:23.799Z","updated_at":"2025-04-19T18:13:09.764Z","avatar_url":"https://github.com/i-e-b.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DynamicPropertyObject\nA tool to drive WinForms PropertyGrid from dynamic data\n\nThis is a cleaned-up and encapsulated version of https://www.codeproject.com/Articles/415070/Dynamic-Type-Description-Framework-for-PropertyGri\n\nThis version is specifically for driving the Windows.Forms.PropertyGrid control from dynamic data\n\n## To do\n\n- NuGet package\n\n## Usage\n\n### Population\n\nCreate a new container object, and use the `AddProperty` extension method to add fields to be rendered in the property grid control.\n\n```csharp\nvar props = DynamicPropertyObject.NewObject();\nprops.AddProperty(key:\"Property1\", displayName:\"Property One\", description:\"This was generated\", initialValue:\"init value\", standardValues:new []{\"Option 1\", \"Option 2\" });\nprops.AddProperty(key:\"Property2\", displayName:\"Property Two\", description:\"An enum\", initialValue: MyEnum.One);\n```\n\n### Set-up\n\nAdd the resulting object as the `SelectedObject` on your property grid.\nIf you make any further changes to the property object, make sure you call `.Refresh()` on the PropertyGrid control.\n\n```csharp\nMyPropGrid.SelectedObject = props;\n. . .\nMyPropGrid.Refresh();\n```\n\n### Reading results\n\nThe current values can be read directly out of the property object by using the `key` name supplied to the `AddProperty` method.\n\n```csharp\n// Direct access to the object:\nvar currentValue = props[\"Property1\"]);\n\n// Reference through the PropertyGrid control:\nvar currentValue = ((PropertyTarget) JourneyStatusGrid.SelectedObject)[\"Property1\"];\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fi-e-b%2Fdynamicpropertyobject","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fi-e-b%2Fdynamicpropertyobject","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fi-e-b%2Fdynamicpropertyobject/lists"}