Triggers in Style
-
Wednesday, November 03, 2010 7:14 AM
Is it possible to use attached dependency property System.Windows.Interactivity.Interaction.Triggers in styles?
<Style TargetType="Window">
<Setter Property="Title" Value="WindowStyleTest"/>
<Setter Property="windowsInteractivity:Interaction.Triggers">
<Setter.Value>
<windowsInteractivity:EventTrigger EventName="MouseDown"/>
</Setter.Value>
</Setter>
</Style>It gives me an error 'Set property System.Windows.Setter.Property threw an exception. -> Value cannot be null. Parameter name: property'.
All Replies
-
Wednesday, December 05, 2012 12:07 AM
No
http://stackoverflow.com/questions/4067876/set-hidden-attachedproperty-through-style/13714089#13714089
Someone changed the String in RegisteredAttached() to "ShadowTriggers" while the method sig is still GetTriggers().
Look at it in ILSpy or Reflector.
You can work around this bug by creating your own Exposure of this property but you still run into a problem with the TriggerCollection being Frozen in a style.
http://www.progtown.com/topic46495-attachedproperty-in-style.html

