WPF charting toolkit, changing/hiding the legend position

Jul 31, 2009 at 7:16 PM
Edited Jul 31, 2009 at 7:19 PM

Hi, can anyone tell me how to change the legend position or hide the legend in a wpf chart. I know that the procedure would be to go and edit the control template for the chart something like this - http://wpf.codeplex.com/Thread/View.aspx?ThreadId=60912

what i am not able to figure out is whats the chartingprimitives namespace mentioned in the code above and what reference do I need to add to my project to make the code in the llink work. I already have the following

xmlns:toolkit="http://schemas.microsoft.com/wpf/2008/toolkit"
xmlns:charting="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit" 

with references to the wpftoolkit.dll and the datavisualization.toolkit.dll already added. I am a novice to wpf and I know the way to get this to work should be pretty simple but I cant figure it out. Couldnt find much help on the net either. Any tips on how to get this to work would be great..
  

Aug 3, 2009 at 4:50 PM

Give this a try: 

xmlns:chartingprimitives="clr-namespace:System.Windows.Controls.DataVisualization.Charting.Primitives;assembly=System.Windows.Controls.DataVisualization.Toolkit"

Aug 4, 2009 at 4:25 AM

that worked !! thanks myczek