[Xamarin.Android] 使用Component套件

[Xamarin.Android] 使用Component套件

前言

在Xamarin中,可以将自己开发的项目包装成为Component套件发布至Xamarin Component Store,来提供其他开发人员使用。本篇介绍如何下载并安装Component套件,让开发人员能够使用Xamarin Component Store中的各种Component套件,为自己留个纪录也希望能帮助到有需要的开发人员。

[Xamarin.Android] 使用Component套件网址:yii666.com<

使用

  1. 在Xamarin.Android项目中的Components文件夹上,点击右键并且选择「Get More Components...」。

    [Xamarin.Android] 使用Component套件文章来源地址:https://www.yii666.com/article/756293.html

  2. 选择项目使用的Component套件,来开启Component套件的套件说明。文章来源地址https://www.yii666.com/article/756293.html

    [Xamarin.Android] 使用Component套件

  3. 点选「Add to App」来将Component套件加入目标项目。网址:yii666.com

    [Xamarin.Android] 使用Component套件

  4. 在Components文件夹中新安装的Component套件上,点击右键并且选择「Edit Component...」,就可以开启Component套件的套件说明。

    [Xamarin.Android] 使用Component套件文章地址https://www.yii666.com/article/756293.html

    [Xamarin.Android] 使用Component套件

  5. 接着依照套件说明介绍的使用方法,在Xamarin.Android项目加入对应的程序代码。

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:flatui="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:padding="20dp"> <FlatUI.FlatEditText
    android:id="@+id/edittextFlat2"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    flatui:fieldStyle="box"
    flatui:cornerRadius="3dip"
    android:layout_margin="10dp"
    android:text="Clark"/> <FlatUI.FlatButton
    android:id="@+id/buttonBlock"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_margin="10dp"
    android:text="Click Me"
    flatui:textAppearance="none" /> <FlatUI.FlatToggleButton
    android:id="@+id/toggleUncheckedEnabled"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_margin="10dp"
    flatui:size="20dip" /> </LinearLayout>
  6. 执行Xamarin.Android项目,就可以看到Component套件在项目中运作的结果。

    [Xamarin.Android] 使用Component套件

版权声明:本文内容来源于网络,版权归原作者所有,此博客不拥有其著作权,亦不承担相应法律责任。文本页已经标记具体来源原文地址,请点击原文查看来源网址,站内文章以及资源内容站长不承诺其正确性,如侵犯了您的权益,请联系站长如有侵权请联系站长,将立刻删除

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信图片_20190322181744_03.jpg

微信扫一扫打赏

请作者喝杯咖啡吧~

支付宝扫一扫领取红包,优惠每天领

二维码1

zhifubaohongbao.png

二维码2

zhifubaohongbao2.png