• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

SuavePirate/SuaveControls.MaterialFormControls: Some Xamarin.Forms input fields ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

SuavePirate/SuaveControls.MaterialFormControls

开源软件地址(OpenSource Url):

https://github.com/SuavePirate/SuaveControls.MaterialFormControls

开源编程语言(OpenSource Language):

C# 100.0%

开源软件介绍(OpenSource Introduction):

SuaveControls.MaterialFormControls

Some Xamarin.Forms input fields built to Material Design Standards

This project is still a work in progress and bound to see updates.

Installation

NuGet version

Use the preview package from NuGet or clone the repository and reference the projects directly:

Install-Package MaterialFormControls -Version 2018.2.22-pre1

Usage

Use each of the form controls in your XAML or C# code, and be sure to initialize the underlying Borderless-Renderer if you have issues with them being linked out:

<suave:MaterialEntry Placeholder="Email" Keyboard="Email" AccentColor="Green"/>
<suave:MaterialEntry Placeholder="Regular Text" AccentColor="Orange"/>
<suave:MaterialEntry Placeholder="Number" Keyboard="Numeric" AccentColor="Red"/>
<suave:MaterialEntry IsPassword="True" Placeholder="Password" AccentColor="Blue"/>
<suave:MaterialDatePicker Placeholder="Date Picker" AccentColor="BlueViolet"/>
<suave:MaterialTimePicker Placeholder="Time Picker" AccentColor="HotPink" />
<suave:MaterialPicker 
    Placeholder="Picker"
    AccentColor="Maroon"
    Items="{Binding PickerData}"
    SelectedItem="{Binding PickerSelectedItem}"
    SelectedIndexChangedCommand="{Binding PickerSelectedIndexChangedCmd}" />
 <suave:MaterialButton x:Name="MyButton" 
      BackgroundColor="#03A9F4" 
      TextColor="White" 
      Text="Click to raise elevation" 
      Elevation="1" 
      VerticalOptions="Center" 
      HorizontalOptions="Center"
      WidthRequest="300"
      BorderRadius="0"
      Clicked="MyButton_Clicked"/>
BorderlessEntry.Init();

Check out the example projects for more in-depth demos.

Validation and State

Check out this blog post for more details https://alexdunn.org/2018/02/22/xamarin-controls-material-form-control-updates/

The controls now allow for an IsValid state as well as updated color properties: DefaultColor, AccentColor, InvalidColor.

This means you can create custom Behaviors that manage the state of the control, or you can manage it through bindings to your ViewModel.

Check out the MaterialFormsBehaviors (https://github.com/SuavePirate/SuaveControls.MaterialEntryBehaviors) repository for examples and helpful Behaviors (work in progress)

Contributing

We are always looking for help to make this project even better!

  • Add new controls
  • Expand on existing controls
  • Fix bugs!

Awesome contributors:




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap