Jump to content
Software FX Community

Setting the Axis.AxisStyle property in xaml


Recommended Posts

I would like to set the AxisStyle property in xaml.  Since this is a mask property, I'm not familiar with how to set this in xaml.

Example.  How should this be set in xaml?

chart1.AxisX.AxisStyle = AxisStyles.Show2Levels | AxisStyles.BreakZero | AxisStyles.LongTick | AxisStyles.AutoScale | AxisStyles.ForceZero;


This is an example of using one of the mask options in xaml, but can I turn on more than one?...

  <ChartFX:Chart Margin="128,86,-102,-55" Name="chart1">


  <ChartFX:Axis AxisStyle="Show2Levels" Line="{x:Null}" PositionValue="0" />





Link to comment
Share on other sites

You would use commas to separate the values. Note that there other flags set as default in the AxisStyle property so if you want to show your axis with 2 levels it would be

<cfx:Axis AxisStyle="Show2Levels,BreakZero,AutoMargin,LongTick,AutoScale,ForceZero,RoundStep,AutoMinorStep,AutoFirstLabel,AutoCenter,AllowHalf" />

This property in some sense legacy from previous versions and we have added several boolean properties to cover the common cases. Can you clarify which of the flags you wanted to turn on/off?


Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...