beltrams Posted December 2, 2010 Report Share Posted December 2, 2010 Dear Forum, I am changing the style of my graph using a resource dictionary. I have some sort of block like the following: <Style x:Key="{x:Type cfx:Chart}" TargetType="{x:Type cfx:Chart}"> <Setter Property="Palette" Value="{x:Static cfx:Palettes.HighContrastBlack}"/> <Setter Property="Border" Value="{x:Static cfx:Borders.RoundedShadow}"/> <Setter Property="BorderBrush" Value="#FF121212"/> </Style>Fou can I set the charts to have the Spotlight style (andd the other properties) using this dictionary? Quote Link to comment Share on other sites More sharing options...
JuanC Posted December 3, 2010 Report Share Posted December 3, 2010 Setting the Spotlight Style is no different than setting the palette, in both cases you are setting a property and the value is the result of using a static property. You will have to add an xml namespace for the Motifs namespace you are interested in and use x:Static as you are doing with Palette or Border. About setting other properties, I am assuming you mean complex properties such as LegendBox, Axis, etc. Note that in ChartFX you cannot reuse objects, e.g. you cannot reuse an Axis or LegendBox in multiple charts so we have some code that detects if you are setting such properties through a style and clone such objects. We support such complex-property styling with the following properties: Chart.LegendBox, Chart.AllSeries, Chart.AxisY, Chart.AxisX and Chart.PlotArea. I don't think this functionality has been heavily used, please let us know if setting certain properties on these objects do not work as expected. JuanC Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.