简体   繁体   中英

Showing MahApps.Metro dialogue from view model

I want to implement LINQToTwitter in my WPF desktop application. Therefore I have to secure it by using OAuth. On the documentation page from L2T I have an example for a console application, but not for a WPF application.

I thought I'd use a simple dialogue which prompts the user to enter a PIN. This is possible with MahApps.metro of course.

Now my question is: How would I do this in Caliburn.Micro. Of course my view model is not inheriting from MetroWindow, but from Screen.

Any Ideas?

首先,您需要在主ViewModel中获取IWindowManager ,然后通过传入对话框的视图模型来使用ShowDialog()方法。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM