I'm wondering the same thing. Still, it's the only thing I can think of so far. I thought of the MultiDataTriggers option, but I don't just have two boolean properties. I actually have three properties, one of which can have three different possible values, another which has 5 different possible values and another which has seven different possible values. Creating triggers for all possible combinations would be a disaster.
I'm not keen about adding an offset property to whatever I'm binding to. That'd couple that class way to strongly to WPF... if I decide to use another framework, I'd have to rewrite the entire thing. Besides, that exposes information about how I want to present the object in this particular case... not a very versatile solution.
The thing is... adding multiple rendertransforms is easy enough:
<
<ScaleTransform ScaleX="4.5" ScaleY="4.5" /> </Path.LayoutTransform>
<Path.RenderTransform>
<TransformGroup>
<TranslateTransform x:Name="PropertyATranslation" Y="0" /> <TranslateTransform x:Name="PropertyBTranslation" Y="0" /> </TransformGroup> </Path.RenderTransform> </Path>
I just can't figure out how to make a setter add something to a property's value rather than replacing it. I also tried naming the transforms and setting a different one for each case:
<Path Name="Thing" Fill="Black"> <Path.LayoutTransform>
<ScaleTransform ScaleX="4.5" ScaleY="4.5" /> </Path.LayoutTransform>
<Path.RenderTransform>
<TransformGroup>
<TranslateTransform Y="50" /> <TranslateTransform Y="30" /> </TransformGroup> </Path.RenderTransform> </Path>
And then have the trigger for property A set PropertyATranslation's Y property and have the trigger for property B set PropertyBTranslation's Y property, but for some reason it can't find them by name.
Edit: Oh, Channel 9. I hate your forum software so much.
Path Name="Thing" Fill="Black"> <Path.LayoutTransform>