ネイティブスタイル-UWPNative styling - UWP
ホスト構成では、各プラットフォームでのほとんどの処理方法を利用できますが、プラットフォームごとにネイティブスタイルを設定する必要があります。While Host Config will get you most of the way there on each platform, it's likely that you will have to do some native styling on each platform.
UWP を使用すると、詳細なスタイル設定、動作、アニメーションなどのために ResourceDictionary を渡すことができます。UWP makes this easy by allowing you to pass a ResourceDictionary for fine-grained styling, behavior, animations, etc.
要素Element | スタイル名Style names |
---|---|
AdaptiveCardAdaptiveCard | Adaptive。カードAdaptive.Card |
Action.OpenUrlAction.OpenUrl | Adaptive. Action. OpenUrlAdaptive.Action.OpenUrl |
Action.ShowCardAction.ShowCard | Adaptive. Action. ShowCardAdaptive.Action.ShowCard |
Action.SubmitAction.Submit | Adaptive. Action. SubmitAdaptive.Action.Submit |
ColumnColumn | Adaptive. Column, Adaptive. TapAdaptive.Column, Adaptive.Action.Tap |
ColumnSetColumnSet | ColumnSet、Adaptive SeparatorAdaptive.ColumnSet, Adaptive.VerticalSeparator |
コンテナーContainer | Adaptive. ContainerAdaptive.Container |
ChoiceSetInput.ChoiceSet | ChoiceSet、ChoiceSet、ChoiceSet、、ChoiceSet、ComboBoxItem のように、を入力して、を入力し、を入力します。Adaptive.Input.ChoiceSet, Adaptive.Input.ChoiceSet.ComboBox, Adaptive.Input.ChoiceSet.CheckBox, Adaptive.Input.ChoiceSet.Radio, Adaptive.Input.ChoiceSet.ComboBoxItem |
入力。日付Input.Date | Adaptive. Text. DateAdaptive.Input.Text.Date |
入力番号Input.Number | Adaptive. Text. NumberAdaptive.Input.Text.Number |
入力テキストInput.Text | Adaptive. 入力テキストAdaptive.Input.Text |
Input. TimeInput.Time | Adaptive. Text. TimeAdaptive.Input.Text.Time |
入力します。トグルInput.Toggle | Adaptive. Input. トグルAdaptive.Input.Toggle |
ImageImage | Adaptive. イメージAdaptive.Image |
ImageSetImageSet | Adaptive ImageSetAdaptive.ImageSet |
FactSetFactSet | FactSet、adaptive。 Title、Adaptive。値。Adaptive.FactSet, Adaptive.Fact.Title, Adaptive.Fact.Value |
TextBlockTextBlock | Adaptive. TextBlockAdaptive.TextBlock |
このサンプル XAML リソースディクショナリは、すべての Textblock の背景を水色に設定します。This sample XAML Resource dictionary that sets the background of all TextBlocks to Aqua. これよりも高度なものが必要になる場合があります。😁You will probably want something more advanced than this 😁
<ResourceDictionary
xmlns="https://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="https://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="Adaptive.TextBlock" TargetType="TextBlock">
<Setter Property="Background" Value="Aqua"></Setter>
</Style>
</ResourceDictionary>
// Use a ResourceDictionary instance
// DON'T use this property if rendering from a server
renderer.Resources = myResourceDictionary;