{"id":14966923,"url":"https://github.com/marplex/livedata","last_synced_at":"2025-10-25T17:30:57.342Z","repository":{"id":46751575,"uuid":"481327275","full_name":"Marplex/LiveData","owner":"Marplex","description":"A simple android LiveData alternative for WPF and C#","archived":false,"fork":false,"pushed_at":"2022-04-23T12:13:11.000Z","size":63,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-07T02:36:22.894Z","etag":null,"topics":["dotnet","mvvm","reactiveui","wpf","wpf-application","wpf-ui"],"latest_commit_sha":null,"homepage":"https://marplex.medium.com/how-i-build-wpf-apps-in-the-android-way-a9bad5e985f9","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/Marplex.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}},"created_at":"2022-04-13T18:18:31.000Z","updated_at":"2023-11-16T11:31:34.000Z","dependencies_parsed_at":"2022-09-23T02:50:53.824Z","dependency_job_id":null,"html_url":"https://github.com/Marplex/LiveData","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marplex%2FLiveData","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marplex%2FLiveData/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marplex%2FLiveData/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marplex%2FLiveData/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Marplex","download_url":"https://codeload.github.com/Marplex/LiveData/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219865216,"owners_count":16555929,"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":["dotnet","mvvm","reactiveui","wpf","wpf-application","wpf-ui"],"created_at":"2024-09-24T13:37:09.476Z","updated_at":"2025-10-25T17:30:56.945Z","avatar_url":"https://github.com/Marplex.png","language":"C#","readme":"![](./Art/cover.png)\n\n\u003ch1 align=\"center\"\u003eLiveData\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n A simple android LiveData alternative for WPF and C#\u003cbr\u003eEasily add reactive properties with a single line of code\n\u003c/p\u003e\n\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/marplex/LiveData/blob/main/LICENSE\"\u003e\u003cimg alt=\"License\" src=\"https://img.shields.io/github/license/marplex/LiveData\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.nuget.org/packages/LiveData/\"\u003e\u003cimg alt=\"Nuget\" src=\"https://img.shields.io/nuget/v/LiveData\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.nuget.org/packages/LiveData/\"\u003e\u003cimg alt=\"Nuget downloads\" src=\"https://img.shields.io/nuget/dt/LiveData?label=nuget-downloads\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/Marplex\"\u003e\u003cimg alt=\"Github\" src=\"https://img.shields.io/static/v1?label=GitHub\u0026message=marplex\u0026color=005cb2\"/\u003e\u003c/a\u003e \n\u003c/p\u003e\n\n# Features\n\n- [x] Automatically notifies value changes\n- [x] Add reactive properties in one line\n- [x] Map LiveData values (Map)\n- [x] Convert one LiveData to another (SwitchMap)\n- [x] Combine two LiveData\n- [x] Debounce emitted values\n- [x] Delay emitted values\n- [x] Convert `Task` to LiveData\n\n# Available for\n\n![NET6](https://img.shields.io/badge/.NET-6.0-red)\u003cbr/\u003e\n![NET5](https://img.shields.io/badge/.NET-5.0-blue)\u003cbr/\u003e\n![NETCore3](https://img.shields.io/badge/.NET%20Core-3.1-brightgreen)\u003cbr/\u003e\n![NETFramework48](https://img.shields.io/badge/.NET%20Framework-4.8-orange)\u003cbr/\u003e\n![NETFramework47](https://img.shields.io/badge/.NET%20Framework-4.7-orange)\u003cbr/\u003e\n![NETFramework46](https://img.shields.io/badge/.NET%20Framework-4.6-orange)\n\n# How to use\n\nUse LiveData on your viewmodels and add reactive properties\n\n```c#\npublic class MyViewModel : ViewModel {\n\n\tpublic LiveData\u003cstring\u003e SearchQuery { get; set; }\n\tpublic LiveData\u003cbool\u003e IsVisible { get; set; }\n\n\tpublic MyViewModel() {\n\n\t\tSearchQuery = new LiveData\u003cstring\u003e(\"\");\n\t\tSearchQuery.Value = \"myname\";\n\n\t\t//React to SearchQuery changes and map the value to a boolean.\n\t\t//Everything is automatically notified to the UI\n\t\tIsVisible = SearchQuery.Map\u003cbool\u003e(it =\u003e it != \"\");\n\t}\n\n}\n```\n\n## Transformations\n\n```c#\n//Map values to async functions\nIsVisible = SearchQuery.MapAsync\u003cbool\u003e(it =\u003e Task.FromResult(true));\n\n\n//Delay emitted values\nDelayedLiveData = MyLiveData.Delay(1000);\n\n\n//Debounce emitted values\nDebounced = MyLiveData.Debounce(1000);\n\n\n//Combine two LiveData\nCombined = First.CombineWith(Second, (a, b) =\u003e a + b);\n\n\n//Convert one LiveData to another LiveData\nMapped = IsVisible.SwitchMap(it =\u003e it ? SearchResultLiveData : EmptyResultLiveData);\n\n\n//Concatenate transformation functions\nFinalLiveData = Name.Delay(1000)\n                    .Debounce(800)\n                    .Map(name =\u003e \"Hello\" + name);\n```\n\n## Utils\n\nExtensions further simplify using and transforming LiveData objects.\n\n```c#\n//Convert task to LiveData\nvar task = Task.FromResult(true);\nLiveData\u003cbool\u003e IsVisible = task.ToLiveData\u003cbool\u003e();\n\n//Append, prepend, remove into LiveData of lists\n//Changes are notified\nLiveData\u003cList\u003cstring\u003e\u003e Items;\nItems.Remove(\"first\");\nItems.Append(\"first\");\nItems.Prepend(\"first\");\n```\n\n## LiveData and XAML Binding\n\nBind LiveData to xaml properties\n\n```xml\n\u003c!-- Bind the \"Value\" property ---\u003e\n\u003cTextBlock Text=\"{Binding LiveData.Value}\" /\u003e\n```\n\n## 📜 License\n\n```xml\nCopyright (c) 2022 Marco\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarplex%2Flivedata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarplex%2Flivedata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarplex%2Flivedata/lists"}