{"id":13594182,"url":"https://github.com/NeutroniumCore/Neutronium","last_synced_at":"2025-04-09T07:30:57.188Z","repository":{"id":2671028,"uuid":"38978941","full_name":"NeutroniumCore/Neutronium","owner":"NeutroniumCore","description":"🚀 Build .NET desktop applications using HTML, CSS and javascript.","archived":false,"fork":false,"pushed_at":"2023-01-03T20:48:42.000Z","size":64096,"stargazers_count":1350,"open_issues_count":91,"forks_count":121,"subscribers_count":58,"default_branch":"master","last_synced_at":"2025-03-04T07:40:18.676Z","etag":null,"topics":["browser","c-sharp","chromium","framework","html","mvvm","reactive-programming","vue","wpf"],"latest_commit_sha":null,"homepage":"https://neutroniumcore.github.io/Neutronium/","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/NeutroniumCore.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":"2015-07-12T21:34:35.000Z","updated_at":"2025-03-02T02:11:00.000Z","dependencies_parsed_at":"2023-01-11T16:11:50.435Z","dependency_job_id":null,"html_url":"https://github.com/NeutroniumCore/Neutronium","commit_stats":null,"previous_names":["david-desmaisons/neutronium"],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeutroniumCore%2FNeutronium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeutroniumCore%2FNeutronium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeutroniumCore%2FNeutronium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeutroniumCore%2FNeutronium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NeutroniumCore","download_url":"https://codeload.github.com/NeutroniumCore/Neutronium/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247980892,"owners_count":21027819,"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":["browser","c-sharp","chromium","framework","html","mvvm","reactive-programming","vue","wpf"],"created_at":"2024-08-01T16:01:29.836Z","updated_at":"2025-04-09T07:30:57.166Z","avatar_url":"https://github.com/NeutroniumCore.png","language":"C#","readme":"\u003cp align=\"center\"\u003e\u003cimg width=\"100\"src=\"./Deploy/logo.svg?sanitize=true\"\u003e\u003c/p\u003e\n\u003ch1 align=\"center\"\u003eNeutronium\u003c/h1\u003e\n\n[![Build status](https://img.shields.io/appveyor/ci/David-Desmaisons/Neutronium.svg)](https://ci.appveyor.com/project/David-Desmaisons/neutronium)\n[![NuGet Badge](https://buildstats.info/nuget/Neutronium.Core)](https://www.nuget.org/packages/Neutronium.Core/)\n[![MIT License](https://img.shields.io/github/license/NeutroniumCore/Neutronium.svg)](https://github.com/NeutroniumCore/Neutronium/blob/master/LICENSE)\n\nhttps://neutroniumcore.github.io/Neutronium/\n\nWhat is Neutronium?\n-------------------\n\n* Neutronium is a library to create **.NET desktop applications** using **HTML, CSS** and **javascript**.\n\n* Neutronium uses **[MVVM pattern](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel)** exactly the same way as WPF application.\n\n* Neutronium provides bindings with **Vue.js** and **Knockout.js** to build powerful HTML5 UI.\n\nWhy Neutronium?\n---------------\n\n* Use all the **power of the javascript stack** to build .NET desktop applications.\n\n* **Easy to use**: \n  * Architecture Neutronium application **just like standard WPF** application.\n  * **Compatible** with popular **MVVM libraries** such as [MVVM Light Toolkit](http://www.mvvmlight.net/) and [reactiveUi](http://reactiveui.net/)\n  * Use **standard javascript frameworks** to build UI\n\n* **Easy to set-up**:\n  * **[Solution template](https://visualstudiogallery.msdn.microsoft.com/c7679997-e25b-4a79-a65f-30758fb756d8)** available for a quick start\n  * **[Use javascript framework cli tools](https://github.com/NeutroniumCore/vue-cli-plugin-neutronium)** to use the same tool chain as web developmenet taking chance of tools such as live reload.\n\n  * **Reuse** ViewModel designed for WPF with a different View Engine.\n\n* Build UI on a 100% **Open Source Stack**\n\nUses cases\n----------\n\n* [Create an application from scratch](./Documentation/Content/UsesCases/New_project.md)\n\n* Migrate an existing WPF MVVM application to Neutronium\n\n* Use Neutronium to embed an HTML control in an WPF application\n\nMain features\n-------------\n * **Reactive** to property and collection changes\n  * **Two way-binding** beetween view and viewmodel, including **command** binding\n \n * **Pluggable architecture**:  \n   * Easily plug-in new javascript frameworks or even embedded browser.\n \nHow?\n----\n\n* Neutronium combines [Chromium](https://www.chromium.org) via [ChromiumFx C# lib](https://bitbucket.org/chromiumfx/chromiumfx) and a binding engine that converts back and forth C# POCO to javascript POCO.\n* Javascript objects are then used as ViewModel for javascript MVVM library such as [knockout.js](\"http://knockoutjs.com/) or [Vue.js](http://vuejs.org/images/logo.png).\n* Listeners are set-up on C# and javascript side for two-way binding.\n   \nOn the shoulders of giants\n--------------------------\n \n \u003cp align=\"center\"\u003e\n \u003ca href=\"https://www.chromium.org\" \u003e\n \u003cimg height=\"60\" src=\"https://www.chromium.org/_/rsrc/1438879449147/config/customLogo.gif?revision=3\"\u003e\n \u003c/a\u003e\n \u003ca href=\"https://bitbucket.org/chromiumembedded/cef\"\u003e\n \u003cimg height=\"70\"src=\"https://bitbucket-assetroot.s3.amazonaws.com/c/photos/2015/Mar/14/3042045877-1-cef-logo_avatar.png\"\u003e\n \u003c/a\u003e\n \u003ca href=\"http://vuejs.org/\"\u003e\n \u003cimg height=\"70\" style=\"margin-top: 10px;\" src=\"http://vuejs.org/images/logo.png\"\u003e\n \u003c/a\u003e\n \u003ca href=\"http://knockoutjs.com/\"\u003e\n \u003cimg height=\"70\" style=\"margin-top: 10px;\" src=\"http://knockoutjs.com/img/ko-logo.png\"\u003e\n \u003c/a\u003e\n \u003c/p\u003e\n\nUsage - Example\n--------------\n\n**ViewModel (C#)**\n\n```CSharp\npublic class ViewModelBase : INotifyPropertyChanged\n{\n\tpublic event PropertyChangedEventHandler PropertyChanged;\n\t\n\tprotected void Set\u003cT\u003e(ref T pnv, T value, string pn)\n\t{\n\t\tpnv = value;\n\t\tPropertyChanged?.Invoke(this, new PropertyChangedEventArgs(pn));\n\t}\n}\n\npublic class Skill\n{\n\tpublic string Type { get;}\n\tpublic string Name { get;}\n\n\tpublic Skill (string name, string skillType)\n\t{\n\t\tName = name;\n\t\tType = skillType;\n\t}\n}\n\npublic class Person: ViewModelBase\n{\n\tprivate string _LastName;\n\tpublic string LastName\n\t{\n\t\tget { return _LastName; }\n\t\tset { Set(ref _LastName, value, \"LastName\"); }\n\t}\n\n\tprivate string _Name;\n\tpublic string Name\n\t{\n\t\tget { return _Name; }\n\t\tset { Set(ref _Name, value, \"Name\"); }\n\t}\n\t\t   \n\tpublic IList\u003cSkill\u003e Skills { get; private set; }\n\n\tpublic ICommand RemoveSkill { get; private set; }\n\t\n\tpublic Person()\n\t{\n\t\tSkills = new ObservableCollection\u003cSkill\u003e();\n\t\tRemoveSkill = new RelayCommand\u003cSkill\u003e(s=\u003e this.Skills.Remove(s));\n\t}\t  \n}\n```\t\t\n\t\t\n**View (HTML)**\n* **First option: use Vue.js**\n```HTML\n\u003c!doctype html\u003e\n\u003chtml\u003e\n\t\u003chead\u003e\n\t\t\u003ctitle\u003eVue.js Example\u003c/title\u003e\n\t\u003c/head\u003e\n\t\u003cbody\u003e\n\t\t\u003cinput type=\"text\" v-model=\"viewModel.Name\" placeholder=\"First name\" \u003e\n\t\t\u003cul\u003e\n\t\t\t\u003cli v-for=\"skill in viewModel.Skills\"\u003e\n\t\t\t\t\u003cspan\u003e{{skill.Type}}:{{skill.Name}}\u003c/span\u003e\n\t\t\t\t\u003cbutton @click=\"RemoveSkill.Execute(skill)\"\u003eRemove skill\u003c/button\u003e\n\t\t\t\u003c/li\u003e\n\t\t\u003c/ul\u003e\n\t\t\u003cdiv\u003e\n\t\t\t\u003ch2\u003e{{viewModel.Name}}\u003c/h2\u003e\n\t\t\t\u003ch2\u003e{{viewModel.LastName}}\u003c/h2\u003e\n\t\t\u003c/div\u003e\n\t\u003c/body\u003e\n\u003c/html\u003e\n```\n\t\n**Create the component(C# Xaml)**\n\n```HTML\n\u003cNeutronium:HTMLViewControl Uri=\"pack://application:,,,/src/index.html\" /\u003e\n```\n\nThe binding is done on the DataContext property just as standard WPF,\nThat's it!\n\nExamples\n--------\n\n[here](https://neutroniumcore.github.io/Neutronium/overview/made.html)\n\nGet started\n----------\n\nBest way to start with Neutronium is to download template C# solution [from visual studio gallery](https://visualstudiogallery.msdn.microsoft.com/c7679997-e25b-4a79-a65f-30758fb756d8).\n\n[See Here](https://neutroniumcore.github.io/Neutronium/articles/installing.html) for detailed instructions.\n\nComplete Documentation\n----------------------\n\n[Here](http://neutroniumcore.github.io/Neutronium/)\n\n\nComparison with other libraries:\n---------------------------------\n* [Electron](http://electron.atom.io/)\n\n\tNeutronium is electron for .NET? Well, kind of. Neutronium however is a higher abstraction so that you don't need to care about Chromium implementation such as renderer or browser processes.\n\n* [Awesomium](http://www.awesomium.com/)\n\n\tDifferent from other libraries Awesomium is not open source. Last update was embedding Chrome 19 so it is pretty out of date. One neutronium distribution offer Awesomium as WebBrowser.\n\n* [CefGlue](https://gitlab.com/xiliumhq/chromiumembedded/cefglue), [ChromiumFx](https://bitbucket.org/chromiumfx/chromiumfx), [CefSharp](https://github.com/cefsharp/CefSharp)\n\n\tAll are open source libraries presenting up-to-date C# binding for [CEF](https://bitbucket.org/chromiumembedded/cef)\n\t\n * [CefGlue](https://gitlab.com/xiliumhq/chromiumembedded/cefglue)\n \n\tOffers all API of CEF. Used by Neutronium as a test WebBrowser using the mono-process option.\n\n * [ChromiumFx](https://bitbucket.org/chromiumfx/chromiumfx)\n \n\tSame as CefGlue + remote API that handles communication between Chromium processes. Neutronium recommended set-up uses ChromiumFx as a WebBrowser.\n\n * [CefSharp](https://github.com/cefsharp/CefSharp)\n \n\tWell documented and package solution (including nuget). Does not offer all CEF binding to javascript however.\n\t\t\nNuget packages\n--------------\n\n[ChromiumFx browser and Vue.js](https://www.nuget.org/packages/Neutronium.ChromiumFx.Vue/)\n\n[ChromiumFx browser and knockout.js](https://www.nuget.org/packages/Neutronium.ChromiumFx.Knockout/)\n\nThis project is a continuation and improvement of [MVVM-for-awesomium.](https://github.com/David-Desmaisons/MVVM-for-awesomium/)\n\n\nSupport\n-------\n\n[![Jetbrains logo](./Deploy/jetbrains-variant-3.svg?sanitize=true)](https://www.jetbrains.com/?from=Neutronium)\n\nMany thanks to [JetBrains](https://www.jetbrains.com/?from=Neutronium) for support and awesome [Resharper](https://www.jetbrains.com/resharper/?from=Neutronium)!\n","funding_links":[],"categories":["C#","C# #","C\\#","GUI","积分","Components \u0026 Libraries","Integrations","Integrations [🔝](#readme)"],"sub_categories":["付款","Integrations","Miscellaneous","GUI - Framework","Payment"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNeutroniumCore%2FNeutronium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNeutroniumCore%2FNeutronium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNeutroniumCore%2FNeutronium/lists"}