4
私たちは、App.xamlのResourceDictionaryXamarinフォームスタイル属性対styleClassのを使ってスタイリング
クラスでのスタイルとstyleClassのオプションを作成することによって、我々は2つの方法で要素のスタイルを設定でき気づいたXamarinは、フォームアプリケーションを構築しています
App.xamlで私たちは、その後、これがこの
ようcontentpagesのいずれかで使用されます <Style Class="EntryStandard" TargetType="Entry">
<Setter Property="TextColor" Value="#575e62" />
<Setter Property="BackgroundColor" Value="#9facb3" />
<Setter Property="FontSize" Value="14" />
</Style>
を書きます210
<Entry StyleClass="EntryStandard" Placeholder="Login Name" Text="{Binding EntryEmailAddress}" />
キーとスタイルオプションが
これは、我々がApp.xaml
下 <Style x:Key="ButtonMainMenu_Purple" TargetType="Button">
<Setter Property="BackgroundColor" Value="#5d4785" />
<Setter Property="FontSize" Value="14" />
<Setter Property="TextColor" Value="#FFFFFF" />
</Style>
を書き、そして私達は私達のcontentpages
<Button Style="{StaticResource ButtonMainMenu_Purple}" Text="Friends" Command="{Binding OnFriendsButtonCommand}" />
両方の作業罰金に次のように使用するものです私はちょうどどちらが他のものより優れているのか、そしてなぜそれを知りたかったのですか?
:(みんながクリスマス休憩しているように見えます.... –