or
<Controls:AutoCompleteBox WatermarkContent="Select a location..." DisplayMemberPath="Name" TextSearchPath="Name" SelectedItem="{Binding ImpactedLocation, Mode=TwoWay, ValidatesOnDataErrors=True}" ItemsSource="{Binding AvailableImpactedLocations}" IsEnabled="{Binding IsOpened}" MaxDropDownHeight="400" DropDownWidth="400" />
<Window xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="WpfApplication1.MainWindow" Title="MainWindow" Height="594.024" Width="902.888"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <telerik:RadPieChart Name="PieChartDemo" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Height="543" Width="428"/> <telerik:RadLegend x:Name="PieLegend" Grid.Column="1" Items="{Binding LegendItems, ElementName=PieChartDemo}"/> </Grid></Window>public MainWindow() { InitializeComponent(); FillPieChart(); } void FillPieChart() { DataTable dtData = new DataTable("DATA"); dtData.Columns.Add(new DataColumn("Name", typeof(string))); dtData.Columns.Add(new DataColumn("Value", typeof(double))); dtData.Rows.Add(new object[] { "Scrap", 5429287.5 }); dtData.Rows.Add(new object[] { "KWH", 713631 }); dtData.Rows.Add(new object[] { "Electrode", 327349 }); dtData.Rows.Add(new object[] { "Alloys", 2372722.3 }); dtData.Rows.Add(new object[] { "Fluxes", 317157.65 }); dtData.Rows.Add(new object[] { "Labor", 300084.1 }); PieChartDemo.Palette = ChartPalettes.Arctic; PieSeries pieSer = new PieSeries(); pieSer.ShowLabels = true; foreach (DataRow drCost in dtData.Rows) { pieSer.DataPoints.Add(new PieDataPoint() { Value = double.Parse(drCost["Value"].ToString()), Label = string.Format("{0}\n{1:N} K", drCost["Name"].ToString(), double.Parse(drCost["Value"].ToString()) / 1000.00) } ); } pieSer.LabelDefinitions.Add(new ChartSeriesLabelDefinition() { Margin = new Thickness(-5, 0, 0, 0) }); pieSer.AngleRange = new AngleRange(270, 360); pieSer.LegendSettings = new DataPointLegendSettings(); PieChartDemo.Series.Clear(); PieChartDemo.Series.Add(pieSer); }pieSer.DataPoints.Add(new PieDataPoint() { Value = double.Parse(drCost["Value"].ToString()), Label = string.Format("{0}\n{1:N} K", drCost["Name"].ToString(), double.Parse(drCost["Value"].ToString()) / 1000.00) }