后台调用样式问题
前台页面: <Style x:Key="treeview_picture" TargetType="sdk:TreeViewItem">
<Setter Property="Header" >
<Setter.Value>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Image Source="/SilverlightApplication19;component/Images/文件夹.png"></Image>
<TextBlock Text="文件管理" />
</StackPanel>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
后台调用: TreeViewItem tvi = new TreeViewItem();
tvi.Style = App.Current.Resources["treeview_picture"] as Style;
为什么调用不了样式呢~?
[解决办法]