wpf - Create properties that only apply on design time -
i using visual studio dark theme. result when designing views cannot see font if black. fix set background of view white. our application has different themes cannot hard code that.
there great properties use when creating usercontrol:
d:designwidth="1110" d:designheight="400" those properties affecting view @ design time. great if can create property d:designbackground not have adding , removing background property every time run application.
not sure if it's you're looking for, plop trigger in app.xaml invoke using isindesignmode property like;
<style targettype="{x:type usercontrol}"> <style.triggers> <trigger property="componentmodel:designerproperties.isindesignmode" value="true"> <setter property="background" value="#ffffff" /> </trigger> </style.triggers> </style> simple, works, , target other dependency properties font , stuff depending on need. hope helps.
ps - can target other targettype's own properties same way, example, childwindows, popups, windows, whatever...
Comments
Post a Comment