2012-05-15 64 views
0

我发现了一个名为VIBlend http://viblend.com/products/net/wpf/controls/free-wpf-controls.aspx的框架。我已经下载了它,并且有一个包含样式的dll文件。它包含一个包含样式的dll。其中一种样式包含在名为ListBox.xaml的文件中(在dll中编译)。WPF绑定到外部样式

它包含一些样式。其中之一是这样宣布的:

现在我想知道如何使用这种风格。如果创建了该dll的引用,但现在? 我想这一个,但它不工作...

<UserControl.Resources> 
<ResourceDictionary x:Key="listBoxStyle" Source="Office2010SilverListBoxStyle"/> 
</UserControl.Resources> 
<ListBox x:Name="listBox" Style="{StaticResource listBoxStyle}"> 

回答

1

试试这个:

<Application.Resources> 
    <ResourceDictionary 
     Source="/PutDllNameHere;component/ListBox.xaml" /> 
</Application.Resources> 
+0

确定的作品,但现在我不弄不明白了我的列表框... –

+0

确定我得到了它现在 –