Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

reuse VisualStates on multiple controls

$
0
0

In my application there are a # of similar user controls that I want to apply identical VisualStates to.

Don't want to duplicate the xaml for each user control - is it possible to specify the VisualStateManager information in a resource dictionary and then include that as a resource in the xaml for each usercontrol?

I would then need to be able to bind  Storyboard.TargetName to the control being applied to

(Storyboard.TargetName is located within the resource dictionary within the VisualStates block)

sorry if its a simple question but all the online examples i found are explicity defining VisualStates within a specific control or window's xaml

 

thanks


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>