or
class Data{ public string Product { get; set; } public decimal Quantity { get; set; } public decimal Reserved { get; set; }}<Window x:Class="WpfApplication2.MainWindow" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" Title="MainWindow"> <Window.Resources> <Style x:Key="DefaultRadPaneStyle" TargetType="telerik:RadPane"> <Setter Property="Focusable" Value="False" /> <Setter Property="PaneHeaderVisibility" Value="Collapsed" /> <Setter Property="CanUserClose" Value="False" /> <Setter Property="CanFloat" Value="False" /> <Setter Property="CanDockInDocumentHost" Value="False" /> <Setter Property="CanUserPin" Value="False" /> <Setter Property="IsPinned" Value="True" /> <Setter Property="ContextMenuTemplate" Value="{x:Null}" /> </Style> </Window.Resources> <Grid> <telerik:RadDocking x:Name="docking" AllowUnsafeMode="True"> <telerik:RadDocking.DocumentHost> <Grid /> </telerik:RadDocking.DocumentHost> <telerik:RadSplitContainer Orientation="Vertical" InitialPosition="DockedLeft" Width="300" MinWidth="100" MaxWidth="400"> <telerik:RadPaneGroup MinHeight="100" MaxHeight="300"> <telerik:RadPane Style="{StaticResource DefaultRadPaneStyle}" /> </telerik:RadPaneGroup> <telerik:RadPaneGroup> <telerik:RadPane Style="{StaticResource DefaultRadPaneStyle}" /> </telerik:RadPaneGroup> <telerik:RadPaneGroup> <telerik:RadPane Style="{StaticResource DefaultRadPaneStyle}" /> </telerik:RadPaneGroup> </telerik:RadSplitContainer> <telerik:RadSplitContainer Orientation="Horizontal" InitialPosition="DockedBottom" Height="300" MinHeight="100" MaxHeight="400"> <telerik:RadPaneGroup> <telerik:RadPane Style="{StaticResource DefaultRadPaneStyle}"> </telerik:RadPane> </telerik:RadPaneGroup> <telerik:RadPaneGroup> <telerik:RadPane Style="{StaticResource DefaultRadPaneStyle}"> </telerik:RadPane> </telerik:RadPaneGroup> <telerik:RadPaneGroup> <telerik:RadPane Style="{StaticResource DefaultRadPaneStyle}"> </telerik:RadPane> </telerik:RadPaneGroup> </telerik:RadSplitContainer> </telerik:RadDocking> </Grid></Window><telerik:RadSplitButton Background="{DynamicResource ButtonBackground}" Click="MisreadButton_Click" CloseOnEscape="False" Content="INCORRECT" DropDownIndicatorVisibility="Visible" DropDownPlacement="Top" FontSize="20" FontWeight="Bold" Foreground="{DynamicResource ButtonForeground}" Height="60" HorizontalAlignment="Right" IsEnabled="False" Margin="10" Name="IncorrectButton" VerticalAlignment="Center" Width="200"> <telerik:RadSplitButton.DropDownContent> <tl:RadContextMenu DisplayMemberPath="Value" ItemsSource="{Binding Path=RejectionReasons, RelativeSource={RelativeSource AncestorType={x:Type c:AlarmsDialog}}}" tl:RadMenuItem.Click="RadContextMenu_ItemClick" /> </telerik:RadSplitButton.DropDownContent> </telerik:RadSplitButton>public class ItemChoice<TKey> : INotifyPropertyChanged { private TKey iKey; public TKey Key { get { return iKey; } set { iKey = value; if ( PropertyChanged != null ) { PropertyChangedEventArgs e = new PropertyChangedEventArgs( "Key" ); PropertyChanged( this, e ); } } } private string iValue = string.Empty; public string Value { get { return iValue; } set { iValue = value; if ( PropertyChanged != null ) { PropertyChangedEventArgs e = new PropertyChangedEventArgs( "Value" ); PropertyChanged( this, e ); } } } public ItemChoice() {} public ItemChoice( TKey key, string value ) { Key = key; Value = value; } public ItemChoice( KeyValuePair<TKey, string> item ) { Key = item.Key; Value = item.Value; } public override string ToString() { return Value.ToString(); } public static explicit operator KeyValuePair<TKey, string>( ItemChoice<TKey> item ) { return new KeyValuePair<TKey, string>( item.Key, item.Value ); } public event PropertyChangedEventHandler PropertyChanged; }
<UserControl x:Class="Example.ScatterPlotPanel" xmlns:local="clr-namespace:Exponent.Sensor.Pet.Analysis" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Name="_this" > <Grid> <telerik:RadPolarChart x:Name="chart" StartAngle="90"> <telerik:RadPolarChart.Grid> <telerik:PolarChartGrid GridLineVisibility="Both" StripesVisibility="Radial"> <telerik:PolarChartGrid.RadialStripeBrushes> <SolidColorBrush Color="#FFD7D7D7" Opacity="0.3" /> <SolidColorBrush Color="Transparent" /> </telerik:PolarChartGrid.RadialStripeBrushes> </telerik:PolarChartGrid> </telerik:RadPolarChart.Grid> <telerik:RadPolarChart.RadialAxis> <telerik:NumericRadialAxis ShowLabels="False" /> </telerik:RadPolarChart.RadialAxis> <telerik:RadPolarChart.PolarAxis> <telerik:PolarAxis Minimum="0" /> </telerik:RadPolarChart.PolarAxis> <telerik:RadPolarChart.Series> <telerik:PolarPointSeries x:Name="series" ItemsSource="{Binding ElementName=_this, Path=DataPoints}" AngleBinding="MissAngleDegrees" ValueBinding="MissDistanceMeters"> <telerik:PolarPointSeries.PointTemplate> <DataTemplate> <Ellipse Height="4" Width="4"> <Ellipse.Style> <Style TargetType="Ellipse"> <Setter Property="Fill" Value="Red"/> <Style.Triggers> <DataTrigger Binding="{Binding Path=DataItem.IsHit}" Value="True"> <Setter Property="Fill" Value="Green"/> </DataTrigger> </Style.Triggers> </Style> </Ellipse.Style> </Ellipse> </DataTemplate> </telerik:PolarPointSeries.PointTemplate> </telerik:PolarPointSeries> </telerik:RadPolarChart.Series> </telerik:RadPolarChart> <Button Content="Test" Click="OnUpdateDataPoints"/> </Grid></local:AnalysisPanel>public class AlarmData { private double missDistance; private double missAngle; private bool isHit; public AlarmData() { } public AlarmData(bool isHit, double missDistance, double missAngle) { this.isHit = isHit; this.missDistance = missDistance; this.missAngle = missAngle; } public bool IsHit { get { return isHit; } set { isHit = value; } } public double MissDistanceMeters { get { return missDistance.Meters; } } public double MissAngleDegrees { get { return missAngle.Degrees; } } } public partial class ScatterPlotPanel : UserControl, INotifyPropertyChanged { private List<AlarmData> dataPoints = new List<AlarmData>(); public event PropertyChangedEventHandler PropertyChanged; public ScatterPlotPanel() { InitializeComponent(); } protected void OnPropertyChanged(string propertyName) { try { if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } catch (Exception ex) { } } protected override void OnUpdateDataPoints(object sender, RoutedEventArgs e) { dataPoints.Clear(); Random random = new Random(); for (int i = 0; i < 100; i++) { dataPoints.Add(new AlarmData(random.Next(0, 2) != 0, Distance.FromCentimeters(random.Next(0, 400)), Angle.FromDegrees(random.Next(0, 359)))); } OnPropertyChanged("DataPoints"); } public List<AlarmData> DataPoints { get { return dataPoints; } } }