簡體   English   中英

如何將Mvvmlight應用於VB.Net項目?

[英]How I can apply Mvvmlight into the VB.Net project.?

我已經嘗試使用vb.net項目,但是由於VB.NET還沒有為MvvmLight准備就緒,因此將不允許訪問C#View和ViewModel。

所以我的問題是我已經在vb.net中已有項目,我想知道如何將MvvmLight應用於VB.NET>

我使用MvvmLight模式在C#中創建了一個小的addressboll,我試圖將該項目集成到我現有的VB.NET項目中,但是它不兼容,所以有什么獨特的方法可以實現MvvmLight模式。

謝謝...!

我在VB.Net中使用MVVM Light。 將C#編譯為DLL並在您的項目中引用時,可以在VB.net中使用。 相反,C#中的VB.Net DLL就是如此。 這就是.NET CLR的優點。

至於MVVM Light的詳細信息,請安裝最新的軟件包http://www.galasoft.ch/mvvm/installing/並引用正確的程序集。

使用Imports語句將GalaSoft.MVVMLight命名空間引入您的項目。

Imports GalaSoft.MvvmLight
Imports GalaSoft.MvvmLight.Messaging
Imports GalaSoft.MvvmLight.Threading
Imports GalaSoft.MvvmLight.Helpers
Imports GalaSoft.MvvmLight.Command

Public Class UseMVVMLightInVB

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM