在Windows Phone 8.1 中为多属性 值设置值

Set value for multi-property value in Style in Windows Phone 8.1

如何在 Windows Phone 8.1 中为 TextBox 样式中的多 属性 值设置值?

TextBox XAML:

<TextBox Style="{StaticResource MyTextBoxInputText}" Template= "{StaticResource MyTextBox}">
  <TextBox.Background>
     <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
         <GradientStop Color="#FFEFEFEF"/>
         <GradientStop Color="White" Offset="1"/>
         <GradientStop Color="White" Offset="0.1"/>
     </LinearGradientBrush>
  </TextBox.Background>
</TextBox>

Style XAML:

<Style x:Key="MyTextBoxInputText" TargetType="TextBox">
        <Setter Property="FontSize" Value="18"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Height" Value="40"/>
        <Setter Property="MinHeight" Value="30"/>
</Style>

如何在样式 MyTextBoxInputText 中指定 LinearGradientBrush 属性 of TextBox?

像这样。

<Style x:Key="MyTextBoxInputText" TargetType="TextBox">
    <Setter Property="FontSize" Value="18"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Height" Value="40"/>
    <Setter Property="MinHeight" Value="30"/>
    <Setter Property="Background">
        <Setter.Value>
            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FFEFEFEF"/>
                <GradientStop Color="White" Offset="1"/>
                <GradientStop Color="White" Offset="0.1"/>
            </LinearGradientBrush>
        </Setter.Value>
    </Setter>
</Style>