{"id":22341362,"url":"https://github.com/junian/mvvmready","last_synced_at":"2025-07-30T01:31:55.102Z","repository":{"id":70114014,"uuid":"120884971","full_name":"junian/mvvmready","owner":"junian","description":"Make cross-platform app MVVM-Ready. Lightweight with only one small binary/file.","archived":false,"fork":false,"pushed_at":"2024-10-25T22:11:23.000Z","size":48,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-03T08:50:45.402Z","etag":null,"topics":["cross-platform","mvvm","mvvm-ready","nuget"],"latest_commit_sha":null,"homepage":"https://www.junian.dev/mvvmready/","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/junian.png","metadata":{"files":{"readme":"docs/README.md","changelog":"CHANGELOG.md","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-02-09T09:23:46.000Z","updated_at":"2024-10-25T22:11:26.000Z","dependencies_parsed_at":"2024-10-25T13:32:47.321Z","dependency_job_id":"c77b63fb-df10-4ae7-8c01-564ec897f94a","html_url":"https://github.com/junian/mvvmready","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junian%2Fmvvmready","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junian%2Fmvvmready/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junian%2Fmvvmready/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junian%2Fmvvmready/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/junian","download_url":"https://codeload.github.com/junian/mvvmready/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227886394,"owners_count":17834990,"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":["cross-platform","mvvm","mvvm-ready","nuget"],"created_at":"2024-12-04T08:06:35.454Z","updated_at":"2024-12-04T08:06:36.154Z","avatar_url":"https://github.com/junian.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"https://3.bp.blogspot.com/-56Kz5T5WL04/Wn_KIg1oEkI/AAAAAAAAC1I/vCszFiZ8SjkW22dAKeCfml74SSfy1i_7wCLcBGAs/s1600/mvvmready.png\" alt=\"MvvmReady Logo\"\u003e\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eMvvmReady\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003eMake cross-platform app MVVM-Ready. Lightweight with only one small binary/file.\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/junian/mvvmready/\"\u003e\u003cimg src=\"https://img.shields.io/badge/GitHub-%23121011.svg?logo=github\u0026logoColor=white\u0026style=for-the-badge\" alt=\"MvvmReady on GitHub\" title=\"MvvmReady on GitHub\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://www.nuget.org/packages/MvvmReady/\"\u003e\u003cimg src=\"https://img.shields.io/nuget/v/MvvmReady.svg?style=for-the-badge\u0026label=NuGet\" alt=\"MvvmReady latest version on NuGet\" title=\"MvvmReady latest version on NuGet\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://www.nuget.org/packages/MvvmReady/\"\u003e\u003cimg src=\"https://img.shields.io/nuget/dt/MvvmReady.svg?style=for-the-badge\" alt=\"MvvmReady total downloads on NuGet\" title=\"MvvmReady total downloads on NuGet\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n----\n\n## Installation\n\nGet [MvvmReady](http://www.nuget.org/packages/MvvmReady) library from NuGet.\n\n```powershell\ndotnet add package MvvmReady\n```\n\n\n## Features\n\n### Command\n\nIt's a simple `ICommand` implementation. Here is an example:\n\n```csharp\npublic ICommand HelloWorldCommand =\u003e new Command(() =\u003e\n{\n    Debug.WriteLine(\"Hello, world!\");\n});\n```\n\n### ViewModelBase\n\nIt's an abstract base class for ViewModels.\n\nUse `Set(ref variable, value)` to set value and trigger `PropertyChanged` event.\n\nUse `RaisePropertyChanged()` to trigger `PropertyChanged` event for current property.\n\nHere is an example:\n\n```csharp\npublic class ProfileViewModel: ViewModelBase\n{\n    private string _name;\n    public string Name\n    {\n        get =\u003e _name;\n        set =\u003e Set(ref _name, value);\n    }\n    \n    public int Age\n    {\n        get =\u003e DateTime.Now.Year - DateOfBirth.Year\n    }\n    \n    private DateTime _dateOfBirth;\n    public DateTime DateOfBirth\n    {\n        get =\u003e _dateOfBirth;\n        set\n        {\n            Set(ref _dateOfBirth, value);\n            RaisePropertyChanged(nameof(Age));\n        }\n    }\n    \n}\n```\n\n### ServiceLocator\n\nIt's a simple service locator.\n\nYou can register interface to implementation by using `ServiceLocator.Current.Register\u003cIInterface, Implementation\u003e()`.\n\nYou can also register service to itself by using `ServiceLocator.Current.Register\u003cService\u003e()`.\n\nYou can register a singleton service by using `ServiceLocator.Current.Register\u003cIInterface\u003e(() =\u003e MyService.Instance)`.\n\nTo get service object, use `ServiceLocator.Current.Get\u003cIService\u003e()`.\n\n## License\n\nThis work is licensed under [MIT](https://github.com/junian/mvvmready/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunian%2Fmvvmready","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjunian%2Fmvvmready","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunian%2Fmvvmready/lists"}