【问题标题】:Xamarin Forms NavigationPage Icon SizesXamarin 表单 NavigationPage 图标大小
【发布时间】:2016-12-09 23:22:06
【问题描述】:

我正在尝试为我的 Xamarin Forms 应用程序创建一个导航栏。我正在添加一些主要的 ToolbarItems,它们将使用以下语法与它们关联一个图标:

ToolbarItems.Add(new ToolbarItem("Search", "ic_action_search.png", ActionSearch, ToolbarItemOrder.Primary));

我到处搜索,但找不到每个平台(Android、iOS、UWP、Windows 和 WinPhone)的推荐图像尺寸。

有人知道他们应该是什么吗?

【问题讨论】:

    标签: xamarin icons xamarin.forms size toolbar


    【解决方案1】:

    谷歌搜索“推荐的工具栏图标大小 [Android|iOS|UWP] 在这里非常有用。

    iOS: https://developer.apple.com/ios/human-interface-guidelines/graphics/custom-icons/

    安卓: https://developer.android.com/guide/practices/ui_guidelines/icon_design_action_bar.html

    UWP: https://msdn.microsoft.com/en-us/windows/uwp/controls-and-patterns/tiles-and-notifications-app-assets

    我没有为 UWP 找到好的图表,因为它支持平板电脑、手机和台式机,因此要复杂得多,但所需的信息在上面的指南中。

    【讨论】:

    • 这是一项很好的研究,可以帮助我确定图像的尺寸,但 Xamarin Forms 使用设备像素来保持尺寸独立于比例。如何获取您提供的信息并计算设计时的设备像素?
    • 顺便说一下,UWP 文章都是关于磁贴图标而不是导航栏图标
    猜你喜欢
    • 2021-01-16
    • 1970-01-01
    • 1970-01-01
    • 2015-06-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-05-25
    相关资源
    最近更新 更多