6

Microsoft 的 Fluent design 基本上是设计应用程序的指南,但它们还包括代码片段和有关如何在 UWP 应用程序中实现它们的工具。许多工具和代码片段可用于 UWP,但我找不到 Xamarin.Forms 的任何东西。

如何在 Xamarin.Forms 中实现 Fluent 设计?

4

1 回答 1

0

在我的商店中,我们将 XAML 用于 UI,您可能会很幸运地为 C# UI 代码编写流畅的方法,但我发现 XAML 的声明性非常直观且易于使用。

话虽如此,您可能想探索 ViewModel 的反应式 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 => { });
于 2019-04-30T22:15:40.577 回答