wpf - Basing On a style defined inside a custom control library -
I am increasing the available WPF t reeView
control for the checkbox < / Code> Behavior like I want to add.
My goal is to finish all checkbox behavioral concerns from the end user (which is a different approach to Josh Smith).
I want to use a style for TreeViewItem
to add some properties and bindings as mentioned in the article. That's why I have created a style, it's normal. Pushed to XML and it is called TreeViewItemStyle
.
My requirement is that I still want the end user to add a style of color and theme).
One way of doing this is using the property's BaseOn
property, but it should use static resources and it fails to find my style , Code> TreeViewItemStyle .
Is there any workaround? Is this really a good approach? What do you do
Arial
Have you generic Are you trying to create XML file in the new resource dictionary?
& lt; Resource Tools xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns: x = "http://schemas.microsoft.com/winfx/2006/xaml"> & Lt; ResourceDictionary.MergedDictionaries & gt; & Lt; Resource source source = "pack: // application:;; / assembly; component / resource / normal. Xaml" /> & Lt; /ResourceDictionary.MergedDocs> & Lt; Style x: key = "newstyle" based on = "{static resource tree wevtmtl}" & gt; & Lt; / Style & gt; & Lt; / ResourceDictionary & gt;
Comments
Post a Comment