在WPF桌面应用程序中使用UWP / WinRT Hub控件

时间:2016-09-05 07:28:55

标签: .net wpf xaml windows-runtime uwp

我正在构建一个支持.NET 4.6 WPF触控的桌面应用程序。我需要在我的应用程序中使用UWP/Windows-Store Hub control的功能。这是我的问题:

有没有办法在.NET桌面应用程序中使用Hub控件?如果没有:

是否可以替代可以与.NET一起使用的Hub控件?

感谢您的帮助!

1 个答案:

答案 0 :(得分:1)

不,没有。

您可以查看一些常见的WPF地铁库,例如mahapps或mui,但我不认为他们有集线器控制。我会检查更多有关bing,google或github的信息,否则请自行查看。它只是一个带有几个面板的 let myDatePicker: UIDatePicker = UIDatePicker() // setting properties of the datePicker myDatePicker.timeZone = NSTimeZone.localTimeZone() myDatePicker.frame = CGRectMake(0, 15, 270, 200) let alertController = UIAlertController(title: "\n\n\n\n\n\n\n\n", message: nil, preferredStyle: UIAlertControllerStyle.Alert) alertController.view.addSubview(myDatePicker) let somethingAction = UIAlertAction(title: "Ok", style: UIAlertActionStyle.Default, handler: nil) let cancelAction = UIAlertAction(title: "Cancel", style: UIAlertActionStyle.Cancel, handler: nil) alertController.addAction(somethingAction) alertController.addAction(cancelAction) self.presentViewController(alertController, animated: true, completion:{}) ,对吧? ;)

另一种方法是建立一个UWP应用程序。它也可以在你的桌面上工作,并且可以通过触摸很好地工作,尽管它可能有一些安全驱动的限制。