I have RadCartesianChart and i am create the AreaSeries view code behind:
RadCartesianChart chart = new RadCartesianChart();chart.HorizontalAxis = new CategoricalAxis();chart.VerticalAxis = new LinearAxis();chart.HorizontalAxis.Visibility = System.Windows.Visibility.Collapsed;chart.VerticalAxis.Visibility = System.Windows.Visibility.Collapsed;// Get the styleStyle smartLabelStyle = (Style)this.Resources["labelStyle"];// Create new labelDefinition and set its DefaultVisualStyle propertyChartSeriesLabelDefinition labelDefinition = new ChartSeriesLabelDefinition() { DefaultVisualStyle = smartLabelStyle, Format = "{0:N2}", Margin = new Thickness(-40, 0, 0, 0) };MyInstanse = new AreaSeries(); // this is my seriesMyInstanse .ShowLabels = true;MyInstanse .LabelDefinitions.Add(labelDefinition);chart.Series.Add(MyInstanse);And this is my XAML label style:<Style x:Key="labelStyle" TargetType="TextBlock"> <Setter Property="Foreground" Value="Gainsboro" /> <Setter Property="Background" Value="Transparent" /></Style>So all i want to add is border around my Label like in this example:
http://docs.telerik.com/devtools/wpf/controls/radchartview/features/labels/smart-labels.html
