I have some xaml code like this:
<s:SciChartSurface>
<s:SciChartSurface.XAxis>
<s:NumericAxis Style="{Binding ..., Converter=...}" />
</s:SciChartSurface.XAxis>
</s:SciChartSurface>
The x axis has a style that depends on a property. The converter selectes one of three different static resources defined somewhere in the xaml. Now the axis itself is polymorph, too, so I create it in the code behind:
<s:SciChartSurface>
<s:SciChartSurface.XAxis>
<Binding CreateAxis />
</s:SciChartSurface.XAxis>
</s:SciChartSurface>
or
<s:SciChartSurface XAxis="{Binding CreateAxis}" />
But how can I apply the dynamic style to the object created in the code behind?