2016-04-12 9 views
0

私は最近、ユニバーサルWindowsプラットフォーム専用のXamarin Formsプロジェクトを開始しました。アプリケーションにいくつかのグローバルスタイルを追加しようとすると、私はuwpと同等の構文がわからない要素を見つけました:Xamarin ContentViewXamarin Xaml "ContentView"に相当するMicrosoft Xaml要素

(。つまり、私が知っているXamarin Label = UWP TextBlock、Xamarin HorizontalOptions = UWP HorizontalAlignment

Xamarin:

<Style x:Key="errorContainer" TargetType="ContentView">   
    <Setter Property="BackgroundColor" Value="Red"/> 
    <Setter Property="HorizontalOptions" Value="Fill"/> 
    <Setter Property="Padding" Value="15"/> 
</Style> 

UWP:

<Style x:Key="errorContainer" TargetType="?????????"> 
    <Setter Property="Background" Value="Red"/> 
    <Setter Property="HorizontalAlignment" Value="Stretch"/> 
    <Setter Property="Padding" Value="15"/> 
</Style> 

tldr。 Xamarin ContentView = UWP ??????

ヘルプ

+0

は、それがコンテンツプレゼンターでしょうか?ユニバーサルアプリケーションのことですか?これはWPFコントロールです。 –

答えて

0

ContentControlのおかげで(と、それはBorderのような種類の派生だが)あなたのニーズに合う必要があります。

(Xamarin.Forms' ContentViewTemplatedViewから派生して、それは、ContentTemplateプロパティを持っているので。)

関連する問題