- I have a Horizontal Stack Bar Chart that I have a problem with. First, I must let you know that I don't currently have the luxury of upgrading this project to the latest release, I'm using 2009 Q3 (v.2009.3.1103.1030).
- My stacked bar is a bit different because it has to display 3 statuses ("Corrected", "Reviewed", & "Identified"). The difference from the normal stacked bar is that each status must be displayed from 0. In my example (see attached image) you see that Error14 has 17 "Corrected", 33 "Reviewed" and 106 "Identified", these are the numbers returned from the database. To get the series to display in the manner required (each number from 0) Corrected is displayed (17) then Reviewed is calculated (33 minus 17 = 16) so that Reviewed actually ends at 33 on the X-scale, Identified is done in the same manner (106 minus 33 = 73).
- I am using the MVVM methodology to standardize a color scheme throughout my project. To facilitate the "displaying from 0" I have two fields, ValueQty is the calculated quantity and ValueDisplay is the actual number returned from the database. The chart is visually correct except for one thing ... TOOLTIPS! I have set the tooltip to the exact same field (ValueLabel) as the field used for the datapoint label but on some of the datapoints the tooltip displayed is incorrect (see attached image). I tried setting the tooltip equal to the label in the itemdatabound event but I still get the incorrect tooltip on the same datapoints. I've stepped through the project and it appears to be using the correct data fields and quantities up until it actually renders the chart, then the tooltips are incorrect. Any help in this matter is greatly appreciated.
Code from project that illustrates issue:
MainPage.xaml |
<UserControl xmlns:my1="clr-namespace:Telerik.Windows.Controls.Charting;assembly=Telerik.Windows.Controls.Charting" |
xmlns:my="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Charting" |
x:Class="StackedBar.MainPage" |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"> |
<Grid x:Name="LayoutRoot"> |
<Grid.Resources> |
<Style x:Name="ErrorStackStyle" |
TargetType="my1:HorizontalStackedBar"> |
<Setter Property="Template"> |
<Setter.Value> |
<ControlTemplate TargetType="my1:HorizontalStackedBar"> |
<Canvas> |
<Rectangle x:Name="PART_DefiningGeometry" |
Height="{TemplateBinding ItemActualHeight}" |
Width="{TemplateBinding ItemActualWidth}" |
RadiusX="3" |
RadiusY="3" |
Stroke="Black" |
StrokeThickness=".5" |
Fill="{Binding DataItem.ErrorStackColor}" /> |
<my1:SeriesItemLabel x:Name="PART_SeriesItemLabel" |
HorizontalAlignment="Center" |
Width="{TemplateBinding ItemActualWidth}" |
Foreground="White" |
Content="{TemplateBinding SeriesItemLabelText}" |
Visibility="{TemplateBinding SeriesItemLabelVisibility}" /> |
<Canvas.RenderTransform> |
<ScaleTransform x:Name="PART_AnimationTransform" |
ScaleY="0" /> |
</Canvas.RenderTransform> |
<Canvas.Triggers> |
<EventTrigger RoutedEvent="Rectangle.Loaded"> |
<EventTrigger.Actions> |
<BeginStoryboard> |
<Storyboard x:Name="PART_Storyboard" |
BeginTime="00:00:00.5"> |
<DoubleAnimation To="1" |
Storyboard.TargetName="PART_AnimationTransform" |
Storyboard.TargetProperty="ScaleY" |
Duration="00:00:00.25" |
BeginTime="00:00:00.2"> |
</DoubleAnimation> |
</Storyboard> |
</BeginStoryboard> |
</EventTrigger.Actions> |
</EventTrigger> |
</Canvas.Triggers> |
</Canvas> |
</ControlTemplate> |
</Setter.Value> |
</Setter> |
</Style> |
</Grid.Resources> |
<my:RadChart x:Name="TotalErrorsRadChart" |
UseDefaultLayout="False" |
ItemDataBound="TotalErrorsRadChart_ItemDataBound"> |
<Grid VerticalAlignment="Stretch" |
HorizontalAlignment="Stretch"> |
<Grid.RowDefinitions> |
<RowDefinition Height="60" /> |
<RowDefinition Height="*" /> |
</Grid.RowDefinitions> |
<Grid.ColumnDefinitions> |
<ColumnDefinition Width="*" /> |
<ColumnDefinition Width="250" /> |
</Grid.ColumnDefinitions> |
<my1:ChartTitle x:Name="ChartTitle" |
Content="Error Status" |
Grid.ColumnSpan="2"></my1:ChartTitle> |
<my1:ChartArea x:Name="BarArea" |
Grid.Row="2" /> |
<my1:ChartLegend x:Name="ChartLegend" |
Header="Legend" |
Grid.Row="2" |
Grid.Column="2" /> |
</Grid> |
</my:RadChart> |
</Grid> |
</UserControl> |
MainPage.xaml.cs |
using System; |
using System.Collections.Generic; |
using System.Linq; |
using System.Net; |
using System.Windows; |
using System.Windows.Controls; |
using System.Windows.Documents; |
using System.Windows.Input; |
using System.Windows.Media; |
using System.Windows.Media.Animation; |
using System.Windows.Shapes; |
using Telerik.Windows.Controls; |
using Telerik.Windows.Controls.Charting; |
namespace StackedBar |
{ |
public partial class MainPage : UserControl |
{ |
public MainPage() |
{ |
InitializeComponent(); |
// Simulating database pull results |
string [,] e = { |
{"Cumulative","Corrected", "BaseX","4","BaseX","38", "0","0","0","0","0", "4","5","3","0","1","7", "1","0","17"}, |
{"Cumulative","Reviewed", "BaseX","4","BaseX","81", "5","4","3","1","3","12","5","3","0","3","7", "1","1","33"}, |
{"Cumulative","Identified","BaseX","4","BaseX","165","5","4","3","1","3","12","8","7","0","4","10","1","1","106"} |
}; |
int TotalErrors = 0; |
string parentName = ""; // not actually required for this test |
// create list with values from e.Results (two dimensional array e is simulated e.Results) |
// this list is 1st part of MVVM -- ErrorStack.cs |
List<ErrorStack> esList = new List<ErrorStack>(); |
for (int i = 0; i < e.GetLength(0); i++) |
{ |
if (e[i, 1] == "Corrected") |
{ |
if (Convert.ToInt32(e[2, 6]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error1", ValueQty = Convert.ToInt32(e[i, 6]), ValueLabel = Convert.ToInt32(e[i, 6]) }); } |
if (Convert.ToInt32(e[2, 7]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error2", ValueQty = Convert.ToInt32(e[i, 7]), ValueLabel = Convert.ToInt32(e[i, 7]) }); } |
if (Convert.ToInt32(e[2, 8]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error3", ValueQty = Convert.ToInt32(e[i, 8]), ValueLabel = Convert.ToInt32(e[i, 8]) }); } |
if (Convert.ToInt32(e[2, 9]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error4", ValueQty = Convert.ToInt32(e[i, 9]), ValueLabel = Convert.ToInt32(e[i, 9]) }); } |
if (Convert.ToInt32(e[2, 10]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error5", ValueQty = Convert.ToInt32(e[i, 10]), ValueLabel = Convert.ToInt32(e[i, 10]) }); } |
if (Convert.ToInt32(e[2, 11]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error6", ValueQty = Convert.ToInt32(e[i, 11]), ValueLabel = Convert.ToInt32(e[i, 11]) }); } |
if (Convert.ToInt32(e[2, 12]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error7", ValueQty = Convert.ToInt32(e[i, 12]), ValueLabel = Convert.ToInt32(e[i, 12]) }); } |
if (Convert.ToInt32(e[2, 13]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error8", ValueQty = Convert.ToInt32(e[i, 13]), ValueLabel = Convert.ToInt32(e[i, 13]) }); } |
if (Convert.ToInt32(e[2, 14]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error9", ValueQty = Convert.ToInt32(e[i, 14]), ValueLabel = Convert.ToInt32(e[i, 14]) }); } |
if (Convert.ToInt32(e[2, 15]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error10", ValueQty = Convert.ToInt32(e[i, 15]), ValueLabel = Convert.ToInt32(e[i, 15]) }); } |
if (Convert.ToInt32(e[2, 16]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error11", ValueQty = Convert.ToInt32(e[i, 16]), ValueLabel = Convert.ToInt32(e[i, 16]) }); } |
if (Convert.ToInt32(e[2, 17]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error12", ValueQty = Convert.ToInt32(e[i, 17]), ValueLabel = Convert.ToInt32(e[i, 17]) }); } |
if (Convert.ToInt32(e[2, 18]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error13", ValueQty = Convert.ToInt32(e[i, 18]), ValueLabel = Convert.ToInt32(e[i, 18]) }); } |
if (Convert.ToInt32(e[2, 19]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error14", ValueQty = Convert.ToInt32(e[i, 19]), ValueLabel = Convert.ToInt32(e[i, 19]) }); } |
} |
if (e[i, 1] == "Reviewed") |
{ |
if (Convert.ToInt32(e[2, 6]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error1", ValueQty = Convert.ToInt32(e[i, 6]) - Convert.ToInt32(e[i - 1, 6]), ValueLabel = Convert.ToInt32(e[i, 6]) }); } |
if (Convert.ToInt32(e[2, 7]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error2", ValueQty = Convert.ToInt32(e[i, 7]) - Convert.ToInt32(e[i - 1, 7]), ValueLabel = Convert.ToInt32(e[i, 7]) }); } |
if (Convert.ToInt32(e[2, 8]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error3", ValueQty = Convert.ToInt32(e[i, 8]) - Convert.ToInt32(e[i - 1, 8]), ValueLabel = Convert.ToInt32(e[i, 8]) }); } |
if (Convert.ToInt32(e[2, 9]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error4", ValueQty = Convert.ToInt32(e[i, 9]) - Convert.ToInt32(e[i - 1, 9]), ValueLabel = Convert.ToInt32(e[i, 9]) }); } |
if (Convert.ToInt32(e[2, 10]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error5", ValueQty = Convert.ToInt32(e[i, 10]) - Convert.ToInt32(e[i - 1, 10]), ValueLabel = Convert.ToInt32(e[i, 10]) }); } |
if (Convert.ToInt32(e[2, 11]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error6", ValueQty = Convert.ToInt32(e[i, 11]) - Convert.ToInt32(e[i - 1, 11]), ValueLabel = Convert.ToInt32(e[i, 11]) }); } |
if (Convert.ToInt32(e[2, 12]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error7", ValueQty = Convert.ToInt32(e[i, 12]) - Convert.ToInt32(e[i - 1, 12]), ValueLabel = Convert.ToInt32(e[i, 12]) }); } |
if (Convert.ToInt32(e[2, 13]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error8", ValueQty = Convert.ToInt32(e[i, 13]) - Convert.ToInt32(e[i - 1, 13]), ValueLabel = Convert.ToInt32(e[i, 13]) }); } |
if (Convert.ToInt32(e[2, 14]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error9", ValueQty = Convert.ToInt32(e[i, 14]) - Convert.ToInt32(e[i - 1, 14]), ValueLabel = Convert.ToInt32(e[i, 14]) }); } |
if (Convert.ToInt32(e[2, 15]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error10", ValueQty = Convert.ToInt32(e[i, 15]) - Convert.ToInt32(e[i - 1, 15]), ValueLabel = Convert.ToInt32(e[i, 15]) }); } |
if (Convert.ToInt32(e[2, 16]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error11", ValueQty = Convert.ToInt32(e[i, 16]) - Convert.ToInt32(e[i - 1, 16]), ValueLabel = Convert.ToInt32(e[i, 16]) }); } |
if (Convert.ToInt32(e[2, 17]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error12", ValueQty = Convert.ToInt32(e[i, 17]) - Convert.ToInt32(e[i - 1, 17]), ValueLabel = Convert.ToInt32(e[i, 17]) }); } |
if (Convert.ToInt32(e[2, 18]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error13", ValueQty = Convert.ToInt32(e[i, 18]) - Convert.ToInt32(e[i - 1, 18]), ValueLabel = Convert.ToInt32(e[i, 18]) }); } |
if (Convert.ToInt32(e[2, 19]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error14", ValueQty = Convert.ToInt32(e[i, 19]) - Convert.ToInt32(e[i - 1, 19]), ValueLabel = Convert.ToInt32(e[i, 19]) }); } |
} |
if (e[i, 1] == "Identified") |
{ |
TotalErrors = Convert.ToInt32(e[i, 5]); |
if (Convert.ToInt32(e[2, 6]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error1", ValueQty = Convert.ToInt32(e[i, 6]) - Convert.ToInt32(e[i - 1, 6]), ValueLabel = Convert.ToInt32(e[i, 6]) }); } |
if (Convert.ToInt32(e[2, 7]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error2", ValueQty = Convert.ToInt32(e[i, 7]) - Convert.ToInt32(e[i - 1, 7]), ValueLabel = Convert.ToInt32(e[i, 7]) }); } |
if (Convert.ToInt32(e[2, 8]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error3", ValueQty = Convert.ToInt32(e[i, 8]) - Convert.ToInt32(e[i - 1, 8]), ValueLabel = Convert.ToInt32(e[i, 8]) }); } |
if (Convert.ToInt32(e[2, 9]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error4", ValueQty = Convert.ToInt32(e[i, 9]) - Convert.ToInt32(e[i - 1, 9]), ValueLabel = Convert.ToInt32(e[i, 9]) }); } |
if (Convert.ToInt32(e[2, 10]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error5", ValueQty = Convert.ToInt32(e[i, 10]) - Convert.ToInt32(e[i - 1, 10]), ValueLabel = Convert.ToInt32(e[i, 10]) }); } |
if (Convert.ToInt32(e[2, 11]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error6", ValueQty = Convert.ToInt32(e[i, 11]) - Convert.ToInt32(e[i - 1, 11]), ValueLabel = Convert.ToInt32(e[i, 11]) }); } |
if (Convert.ToInt32(e[2, 12]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error7", ValueQty = Convert.ToInt32(e[i, 12]) - Convert.ToInt32(e[i - 1, 12]), ValueLabel = Convert.ToInt32(e[i, 12]) }); } |
if (Convert.ToInt32(e[2, 13]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error8", ValueQty = Convert.ToInt32(e[i, 13]) - Convert.ToInt32(e[i - 1, 13]), ValueLabel = Convert.ToInt32(e[i, 13]) }); } |
if (Convert.ToInt32(e[2, 14]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error9", ValueQty = Convert.ToInt32(e[i, 14]) - Convert.ToInt32(e[i - 1, 14]), ValueLabel = Convert.ToInt32(e[i, 14]) }); } |
if (Convert.ToInt32(e[2, 15]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error10", ValueQty = Convert.ToInt32(e[i, 15]) - Convert.ToInt32(e[i - 1, 15]), ValueLabel = Convert.ToInt32(e[i, 15]) }); } |
if (Convert.ToInt32(e[2, 16]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error11", ValueQty = Convert.ToInt32(e[i, 16]) - Convert.ToInt32(e[i - 1, 16]), ValueLabel = Convert.ToInt32(e[i, 16]) }); } |
if (Convert.ToInt32(e[2, 17]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error12", ValueQty = Convert.ToInt32(e[i, 17]) - Convert.ToInt32(e[i - 1, 17]), ValueLabel = Convert.ToInt32(e[i, 17]) }); } |
if (Convert.ToInt32(e[2, 18]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error13", ValueQty = Convert.ToInt32(e[i, 18]) - Convert.ToInt32(e[i - 1, 18]), ValueLabel = Convert.ToInt32(e[i, 18]) }); } |
if (Convert.ToInt32(e[2, 19]) > 0) { esList.Add(new ErrorStack() { ValueType = e[i, 1], ValueName = "Error14", ValueQty = Convert.ToInt32(e[i, 19]) - Convert.ToInt32(e[i - 1, 19]), ValueLabel = Convert.ToInt32(e[i, 19]) }); } |
} |
} |
// create the view model and copy model into it (assigns colors) |
// this List is 2nd part of MVVM -- ErrorsStack.cs - ErrorsStackViewModel |
List<ErrorStack.ErrorsStackViewModel> viewModel = new List<ErrorStack.ErrorsStackViewModel>(); |
foreach (ErrorStack listEntry in esList) |
{ |
viewModel.Add(new ErrorStack.ErrorsStackViewModel(listEntry)); |
} |
// define series mapping & series definition |
SeriesMapping mapping = new SeriesMapping(); |
HorizontalStackedBarSeriesDefinition hsbsd = new HorizontalStackedBarSeriesDefinition(); |
// apply series definition to mapping |
mapping.SeriesDefinition = hsbsd; |
// appy item style and stack group name |
hsbsd.ItemStyle = this.ErrorStackStyle; |
hsbsd.StackGroupName = "ErrorStack.ValueQty"; |
// apply item mapping to designate X & Y axis values/categories/labels/tooltips |
mapping.ItemMappings.Add(new ItemMapping("ErrorStack.ValueQty", DataPointMember.YValue)); |
mapping.ItemMappings.Add(new ItemMapping("ErrorStack.ValueName", DataPointMember.XCategory)); |
mapping.ItemMappings.Add(new ItemMapping("ErrorStack.ValueLabel", DataPointMember.Label)); // this is working correctly |
mapping.ItemMappings.Add(new ItemMapping("ErrorStack.ValueLabel", DataPointMember.Tooltip)); // this isn't working correctly |
// Make tooltips visible |
hsbsd.ShowItemToolTips = true; |
// designate grouping descriptor (what to group the stacks by) |
mapping.GroupingSettings.GroupDescriptors.Add(new ChartGroupDescriptor("ErrorStack.ValueType")); |
// bind view model to chart |
this.TotalErrorsRadChart.ItemsSource = viewModel; |
// add series mapping to chart |
mapping.ChartAreaName = "BarArea"; |
this.TotalErrorsRadChart.SeriesMappings.Add(mapping); |
// add title |
ChartTitleChartTitle.Content = ChartTitle.Content + " - " + parentName + " (" + String.Format("{0:0,0}", TotalErrors) + " Total Errors)"; |
// add legend items |
ChartLegendItem legendCorrected = new ChartLegendItem(); |
legendCorrected.Label = "Corrected"; |
legendCorrected.Background = new SolidColorBrush(Colors.Green); |
ChartLegend.Items.Add(legendCorrected); |
ChartLegendItem legendReviewed = new ChartLegendItem(); |
legendReviewed.Label = "Reviewed"; |
legendReviewed.Background = new SolidColorBrush(Colors.Blue); |
ChartLegend.Items.Add(legendReviewed); |
ChartLegendItem legendIdentified = new ChartLegendItem(); |
legendIdentified.Label = "Identified"; |
legendIdentified.Background = new SolidColorBrush(Color.FromArgb(255, 160, 82, 45)); // Sienna |
ChartLegend.Items.Add(legendIdentified); |
} |
private void TotalErrorsRadChart_ItemDataBound(object sender, ChartItemDataBoundEventArgs e) |
{ |
//DataPoint dataPoint = e.DataPoint; |
//dataPointdataPoint.Tooltip = dataPoint.Label; |
} |
//protected void TotalErrorsRadChart_BeforeLayout(object sender, EventArgs e) |
//{ |
// for (int i = 0; i < BarArea.AxisY.ChartArea.Items.Count; i++) |
// { |
// } |
//} |
} |
} |
ErrorStack.cs |
using System; |
using System.Net; |
using System.Windows; |
using System.Windows.Controls; |
using System.Windows.Documents; |
using System.Windows.Ink; |
using System.Windows.Input; |
using System.Windows.Media; |
using System.Windows.Media.Animation; |
using System.Windows.Shapes; |
namespace StackedBar |
{ |
public enum Status { Corrected, Reviewed, Identified, none }; |
public class ErrorStack |
{ |
public string ValueType |
{ get; set; } |
public string ValueName |
{ get; set; } |
public Int32 ValueQty |
{ get; set; } |
public Int32 ValueLabel |
{ get; set; } |
public Status Status |
{ |
get |
{ |
if (this.ValueType == "Corrected") |
return Status.Corrected; |
if (this.ValueType == "Reviewed") |
return Status.Reviewed; |
if (this.ValueType == "Identified") |
return Status.Identified; |
else return Status.none; |
} |
} |
public class ErrorsStackViewModel |
{ |
public ErrorsStackViewModel(ErrorStack errorStack) |
{ |
this.ErrorStack = errorStack; |
} |
public ErrorStack ErrorStack |
{ |
get; |
set; |
} |
public Brush ErrorStackColor |
{ |
get |
{ |
SolidColorBrush green = |
new SolidColorBrush(Colors.Green); |
SolidColorBrush blue = |
new SolidColorBrush(Colors.Blue); |
SolidColorBrush sienna = |
new SolidColorBrush(Color.FromArgb(255, 160, 82, 45)); // Sienna |
switch (this.ErrorStack.Status) |
{ |
case Status.Corrected: return green; |
case Status.Reviewed: return blue; |
case Status.Identified: return sienna; |
default: return new SolidColorBrush(Colors.White); |
} |
} |
} |
} |
} |
} |