Styling the Graphing control

Apr 8, 2009 at 12:27 PM


   I'm using the Graphing control and I'm trying to find out how to format it the same way as the example on the . when I use the control I get the start & end dates of the timeline for each graph plus a Horizontal scroll bar for each graph. The Example on site has neighter of these. does anypne know how to achieve this?


Apr 9, 2009 at 1:26 PM


If you have installed MSCUI.msi and followed the instructions in the Getting Started guide to extract the included Zip file, you will have a local copy of our solution including the MSCUI website and all the samples.

The source for the Graphing sample can be found at:


The key points to note are:

1) The individual TimeLineGraphs and TimeIBarGraphs are hosted inside the GraphHost control
2) In this configuration, the GraphHost manages the layout and implements features such as the data selector, five buttons and "Period" combobox at the top of the sample
3) The graphs all have a custom style defined which hides elements such as the X-axis and horizontal scrollbar: Style="{StaticResource OverriddenDefaultStyle}"
4) OverriddenDefaultStyle is defined in Microsoft.Cui.SamplePages\App.xaml

Further information is available on the MSCUI Graphing Control page if you expand the Usage Hints sections located beneath the sample.

We have just published a new blog which shows how to restyle a single TimeLineGraph. It may have some useful information for you regardng the elements that make up each graph.


Jun 14, 2011 at 1:25 PM

If you are adding a user-configurable number of graphs at runtime (to the GraphHost), how do you style the graph in code to exclude the components of the control as above i.e. labels and scrollbar?