2012-05-15 65 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

確定我得到了它現在 –