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) }<Target Name="AfterResolveReferences"> <ItemGroup> <EmbeddedResource Include="@(ReferenceCopyLocalPaths)" Condition="$([System.Text.RegularExpressions.Regex]::IsMatch(%(ReferenceCopyLocalPaths.Filename), 'Telerik')) And '%(ReferenceCopyLocalPaths.Extension)' == '.dll'"> <LogicalName>%(ReferenceCopyLocalPaths.DestinationSubDirectory)%(ReferenceCopyLocalPaths.Filename)%(ReferenceCopyLocalPaths.Extension)</LogicalName> </EmbeddedResource> </ItemGroup></Target>namespace WpfApplication1{ using System; using System.Collections.Generic; using System.Linq; using System.Reflection; public class Program { [STAThreadAttribute] public static void Main() { var assemblies = new Dictionary<string, Assembly>(); var executingAssembly = Assembly.GetExecutingAssembly(); var resources = executingAssembly.GetManifestResourceNames().Where(n => n.StartsWith("Telerik")).Where(n => n.EndsWith(".dll")); foreach (string resource in resources) { using (var stream = executingAssembly.GetManifestResourceStream(resource)) { if (stream == null) continue; var bytes = new byte[stream.Length]; stream.Read(bytes, 0, bytes.Length); try { assemblies.Add(resource, Assembly.Load(bytes)); } catch (Exception ex) { System.Diagnostics.Debug.Print(string.Format("Failed to load: {0}, Exception: {1}", resource, ex.Message)); } } } AppDomain.CurrentDomain.AssemblyResolve += (s, e) => { var assemblyName = new AssemblyName(e.Name); var path = string.Format("{0}.dll", assemblyName.Name); if (assemblies.ContainsKey(path)) { return assemblies[path]; } return null; }; App.Main(); } }} <PropertyGroup> <PostBuildEvent>del /F /Q "$(TargetDir)Telerik*"rmdir /S /Q "$(TargetDir)de"rmdir /S /Q "$(TargetDir)es"rmdir /S /Q "$(TargetDir)fr"rmdir /S /Q "$(TargetDir)it"rmdir /S /Q "$(TargetDir)nl"rmdir /S /Q "$(TargetDir)tr"</PostBuildEvent> </PropertyGroup>