【问题标题】:.Net Maui XAML Input field component.Net Maui XAML 输入字段组件
【发布时间】:2022-07-22 11:24:32
【问题描述】:

我似乎找不到要在 .net maui xaml 应用程序中使用的简单文本输入字段。 Looking at the docs 在用户界面/控件/视图部分有许多处理用户交互/输入的组件,例如复选框和滑块,甚至还有一个搜索字段组件(对我来说应该只是一个专门的输入字段),但没有文本输入。

如何在 .Net Maui 中使用 Xaml 创建输入字段?

(我确实找到了telerik,但我认为它要花钱,我只是在寻找“默认”选项)

【问题讨论】:

    标签: .net xaml .net-6.0 maui


    【解决方案1】:

    据我了解,您正在寻找编辑或条目。

    我猜文档仍然不完整或不正确

    它的基本实现如下所示:

    小文本框:

    <Entry
      MaxLength="20"
      Style="{StaticResource CommonEntryStyle}"
      Text="This is the text." />
    

    多行:

    <Editor
      MaxLength="20"
      Style="{StaticResource CommonEditorStyle}"
      Text="This is the text." />
    

    【讨论】:

      【解决方案2】:

      对于像我一样发现此问题的任何人,文档自 6 月起就可以使用:

      单行Entry component

      多行Editor component

      【讨论】:

        猜你喜欢
        • 2022-09-28
        • 2022-11-17
        • 2023-02-22
        • 2022-11-09
        • 2022-06-20
        • 2022-12-24
        • 2020-12-15
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多