microsoft的流畅设计基本上是设计应用程序的指南,但它们还包括有关如何在UWP应用程序中实现它们的代码片段和工具。很多工具和片段都可用于UWP,但我找不到任何xamarin表格。如何以xamarin形式实现这些实践。
答案 0 :(得分:0)
在我的商店中,我们将XAML用于UI,您可能会为C#UI代码编写流利的方法,但是我发现XAML的声明性非常直观并且最容易使用。
话虽如此,您可能想探索ViewModel的Reactive UI。开箱即用,设计流畅。
https://reactiveui.net/docs/guidelines/platform/xamarin-forms
var canExecute = this.WhenAnyValue(
x => x.UserName, x => x.Password,
(userName, password) =>
!string.IsNullOrEmpty(userName) &&
!string.IsNullOrEmpty(password));
LoadCommand = ReactiveCommand.CreateFromTask(LogOnAsync, canExecute);
LoadCommand.ThrownExceptions.Subscribe(error => { });