What is the advantage of Properties Triggers over Data Triggers in WPF -
I try to understand the advantages of the property triggers on the Data Trigger in WPF. It appears that property trigger can only be started with a value that changes into the asset of dependency, and both of the data triggers can be triggered on a value that turns into dependency assets, And a value that implements INOTifyPropertyChange. So my question is, why not always use data triggers?
triggers looks
example :
pre> & style; Type StyleType = "ListBoxItem" & gt; & Lt; Style.Triggers & gt; & Lt; Trigger Property = "Ismouth Over" Value = "True" & gt; & Lt ;! - Apply when mouse is on ListBoxItem - & gt; & Lt; / Catalyst & gt; & Lt; DataTrigger binding = "{binding name}" value = "Kent" & gt; & Lt ;! - Apply when the name property is set in ListBoxItem's data "Kent" - & gt; & Lt; / DataTrigger & gt; & Lt; /Style.Triggers> & Lt; / Style & gt;
Comments
Post a Comment