作成日: 2017/08/01 最終更新日: 2017/08/01
文書種別
技術情報
詳細
XAMLでコンポーネントへの参照を定義する場合、タグの要素で、参照を指定する必要があります。
以下サンプルではGaugeの参照を追加しています。
サンプルコード
XAML(Xamarin.Forms)
Studio for Xamarinの各コンポーネントを参照する場合は以下の文字列を記述してください。
Calendar
FlexGrid
FlexChart
Gauge
Input
また、1つのページで複数のコンポーネントを利用する場合は、名前空間を固有にして追加する必要があります。
ComponentOne Studio > Studio for Xamarin > 製品ヘルプ > XAML によるコンポーネントの追加
以下サンプルではGaugeの参照を追加しています。
サンプルコード
XAML(Xamarin.Forms)
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="YourAppName.Page1" xmlns:c1="clr-namespace:C1.Xamarin.Forms.Gauge;assembly=C1.Xamarin.Forms.Gauge" >
Studio for Xamarinの各コンポーネントを参照する場合は以下の文字列を記述してください。
Calendar
xmlns:c1="clr-namespace:C1.Xamarin.Forms.Calendar;assembly=C1.Xamarin.Forms.Calendar"
FlexGrid
xmlns:c1="clr-namespace:C1.Xamarin.Forms.Grid;assembly=C1.Xamarin.Forms.Grid"
FlexChart
xmlns:c1="clr-namespace:C1.Xamarin.Forms.Chart;assembly=C1.Xamarin.Forms.Chart
Gauge
xmlns:c1="clr-namespace:C1.Xamarin.Forms.Gauge;assembly=C1.Xamarin.Forms.Gauge"
Input
xmlns:c1="clr-namespace:C1.Xamarin.Forms.Input;assembly=C1.Xamarin.Forms.Input"
また、1つのページで複数のコンポーネントを利用する場合は、名前空間を固有にして追加する必要があります。
xmlns:c1calendar="clr-namespace:C1.Xamarin.Forms.Calendar;assembly=C1.Xamarin.Forms.Calendar" xmlns:c1input="clr-namespace:C1.Xamarin.Forms.Input;assembly=C1.Xamarin.Forms.Input"
ComponentOne Studio > Studio for Xamarin > 製品ヘルプ > XAML によるコンポーネントの追加
旧文書番号
82281