如何在generic.xaml文件夹中写控件的样式设置
怎么在generic.xaml文件夹中写控件的样式设置啊
我就是想要设置一下控件的样式,想要把下面这段代码放在generic文件中,但是我找不到这个文件啊 不知道要怎么创建这个文件
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Phone.Controls;assembly=Phone.Controls">
<Style TargetType="local:ScrollableTextBlock" >
<Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="FontSize" Value="{StaticResource PhoneFontSizeMedium}"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="Width" Value="200" />
<Setter Property="Height" Value="70" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="local:ScrollableTextBlock">
<ScrollViewer x:Name="ScrollViewer" Foreground="{TemplateBinding Foreground}"
Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
<StackPanel Orientation="Vertical" x:Name="StackPanel" />
</ScrollViewer>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
------解决方案--------------------

Themes\
我就是想要设置一下控件的样式,想要把下面这段代码放在generic文件中,但是我找不到这个文件啊 不知道要怎么创建这个文件
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Phone.Controls;assembly=Phone.Controls">
<Style TargetType="local:ScrollableTextBlock" >
<Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="FontSize" Value="{StaticResource PhoneFontSizeMedium}"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="Width" Value="200" />
<Setter Property="Height" Value="70" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="local:ScrollableTextBlock">
<ScrollViewer x:Name="ScrollViewer" Foreground="{TemplateBinding Foreground}"
Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
<StackPanel Orientation="Vertical" x:Name="StackPanel" />
</ScrollViewer>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
------解决方案--------------------
Themes\