Revert "Merge pull request #56 from telerik/sdkUpdates"

This reverts commit 0a6c5adc49, reversing
changes made to c32a887466.
This commit is contained in:
Martin Ivanov 2024-05-15 14:26:32 +03:00
Родитель 0a6c5adc49
Коммит 7bb1378aa2
12359 изменённых файлов: 783209 добавлений и 9548 удалений

Просмотреть файл

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{052E1B45-DF3A-4D11-8F9F-54E828CFCB00}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AddNewItemsWithButton</RootNamespace>
<AssemblyName>AddNewItemsWithButton</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="Telerik.Windows.Controls">
<HintPath>$(TELERIKWPFDIR)\Binaries\WPF40\Telerik.Windows.Controls.dll</HintPath>
</Reference>
<Reference Include="Telerik.Windows.Controls.Input">
<HintPath>$(TELERIKWPFDIR)\Binaries\WPF40\Telerik.Windows.Controls.Input.dll</HintPath>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="SearchTextToBoolConverter.cs" />
<Compile Include="ViewModel.cs" />
<Page Include="Example.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="Country.cs" />
<Compile Include="Example.xaml.cs">
<DependentUpon>Example.xaml</DependentUpon>
</Compile>
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup>
<Resource Include="Readme.md" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Просмотреть файл

@ -0,0 +1,8 @@
<Application x:Class="AddNewItemsWithButton.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>

Просмотреть файл

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
namespace AddNewItemsWithButton
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}

Просмотреть файл

@ -0,0 +1,12 @@

namespace AddNewItemsWithButton
{
public class Country
{
public string Name { get; set; }
public string Capital { get; set; }
public int Id { get; set; }
}
}

Просмотреть файл

@ -0,0 +1,40 @@
<UserControl x:Class="AddNewItemsWithButton.Example"
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"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:local="clr-namespace:AddNewItemsWithButton"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="700">
<UserControl.DataContext>
<local:ViewModel/>
</UserControl.DataContext>
<UserControl.Resources>
<local:SearchTextToBoolConverter x:Key="SearchTextToBoolConverter"/>
</UserControl.Resources>
<Grid x:Name="LayoutRoot" Background="White" Width="700">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="This example demonstrates how to add new Items to the ItemsSource collection of the control with the use of a simple Button."
TextWrapping="Wrap" Width="400" Margin="20 50 20 20" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Button Content="Add new item"
Grid.Row="1"
Click="Button_Click"
IsEnabled="{Binding ElementName=AutoCompleteBox, Path=SearchText, Converter={StaticResource SearchTextToBoolConverter}}"
MinWidth="200" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock x:Name="ResultTextBlock" VerticalAlignment="Center" HorizontalAlignment="Center" Width="250" TextWrapping="Wrap"
Margin="20" Grid.Row="2" MinHeight="32"/>
<telerik:RadAutoCompleteBox Grid.Row="3" Margin="20" Width="200"
ItemsSource="{Binding Countries}"
AutoCompleteMode="Suggest"
DisplayMemberPath="Name"
x:Name="AutoCompleteBox"
VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>
</UserControl>

Просмотреть файл

@ -0,0 +1,29 @@
using System.Collections.ObjectModel;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
namespace AddNewItemsWithButton
{
public partial class Example : UserControl
{
public Example()
{
InitializeComponent();
}
private void Button_Click(object sender, RoutedEventArgs e)
{
var inputText = this.AutoCompleteBox.SearchText;
var itemsSource = this.AutoCompleteBox.ItemsSource as ObservableCollection<Country>;
var newItem = new Country() { Name = this.AutoCompleteBox.SearchText };
if (!itemsSource.Any(item => item.Name == newItem.Name))
{
itemsSource.Add(newItem);
this.AutoCompleteBox.ItemsSource = itemsSource;
this.AutoCompleteBox.SelectedItem = newItem;
this.ResultTextBlock.Text = string.Format("Successfully added new item ({0}) to the ItemsSource collection.", newItem.Name);
}
}
}
}

Просмотреть файл

@ -0,0 +1,13 @@
<UserControl x:Class="AddNewItemsWithButton.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"
xmlns:local="clr-namespace:AddNewItemsWithButton"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
<Grid x:Name="LayoutRoot" Background="White">
<local:Example/>
</Grid>
</UserControl>

Просмотреть файл

@ -0,0 +1,12 @@
using System.Windows.Controls;
namespace AddNewItemsWithButton
{
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
}
}
}

Просмотреть файл

@ -0,0 +1,9 @@
<Window x:Class="AddNewItemsWithButton.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:AddNewItemsWithButton"
Title="MainWindow" Height="400" Width="700">
<Grid>
<local:Example/>
</Grid>
</Window>

Просмотреть файл

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace AddNewItemsWithButton
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
}
}

Просмотреть файл

@ -0,0 +1,6 @@
<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
<Deployment.Parts>
</Deployment.Parts>
</Deployment>

Просмотреть файл

@ -0,0 +1,35 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("AddNewItemsWithButton")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("AddNewItemsWithButton")]
[assembly: AssemblyCopyright("Copyright © 2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("824adef3-64a8-4d84-a087-6891e18b3422")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

71
AutoCompleteBox/AddNewItemsWithButton/Properties/Resources.Designer.cs сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18010
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace AddNewItemsWithButton.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AddNewItemsWithButton.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

Просмотреть файл

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

30
AutoCompleteBox/AddNewItemsWithButton/Properties/Settings.Designer.cs сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18010
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace AddNewItemsWithButton.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}

Просмотреть файл

@ -0,0 +1,4 @@
## Add New Items With Button
This example demonstrates how to add new Items to the ItemsSource collection of the control with the use of a simple Button.
[//]: <keywords:itemssource, collection>

Просмотреть файл

@ -0,0 +1,18 @@
using System;
using System.Windows.Data;
namespace AddNewItemsWithButton
{
public class SearchTextToBoolConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return !string.IsNullOrEmpty((string)value);
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
}
}

Просмотреть файл

@ -0,0 +1,29 @@
using System.Collections.ObjectModel;
namespace AddNewItemsWithButton
{
public class ViewModel
{
public ObservableCollection<Country> Countries { get; set; }
public ViewModel()
{
this.Countries = new ObservableCollection<Country>()
{
new Country() { Name = "Australia", Capital = "Canberra", Id = 1 },
new Country() { Name = "Bulgaria", Capital = "Sofia" , Id = 2 },
new Country() { Name = "Canada", Capital = "Ottawa" , Id = 3 },
new Country() { Name = "Denmark", Capital = "Copenhagen" , Id = 4 },
new Country() { Name = "France", Capital = "Paris" , Id = 5 },
new Country() { Name = "Germany", Capital = "Berlin" , Id = 6 },
new Country() { Name = "India", Capital = "New Delhi" , Id = 7 },
new Country() { Name = "Italy", Capital = "Rome" , Id = 8 },
new Country() { Name = "Norway", Capital = "Oslo" , Id = 9 },
new Country() { Name = "Russia", Capital = "Moscow" , Id = 10 },
new Country() { Name = "Spain ", Capital = "Madrid" , Id = 11 },
new Country() { Name = "United Kingdom", Capital = "London" , Id = 12 },
new Country() { Name = "United States", Capital = "Washington, D.C." , Id = 13 },
};
}
}
}

Просмотреть файл

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>

Просмотреть файл

@ -0,0 +1,8 @@
<Application x:Class="AsynchronousFiltering.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>

Просмотреть файл

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace AsynchronousFiltering
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}

Просмотреть файл

@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{885922CC-C114-4195-9D31-03AECD27408E}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AsynchronousFiltering</RootNamespace>
<AssemblyName>AsynchronousFiltering</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="Telerik.Windows.Controls">
<HintPath>$(TELERIKWPFDIR)\Binaries\WPF40\Telerik.Windows.Controls.dll</HintPath>
</Reference>
<Reference Include="Telerik.Windows.Controls.Input">
<HintPath>$(TELERIKWPFDIR)\Binaries\WPF40\Telerik.Windows.Controls.Input.dll</HintPath>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="ViewModels\Item.cs" />
<Compile Include="ViewModels\MainViewModel.cs" />
<Page Include="Example.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="Example.xaml.cs">
<DependentUpon>Example.xaml</DependentUpon>
</Compile>
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Resource Include="Readme.md" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Просмотреть файл

@ -0,0 +1,67 @@
<UserControl x:Class="TestApplication.Example"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:viewModels="clr-namespace:TestApplication.ViewModels"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="300">
<UserControl.DataContext>
<viewModels:MainViewModel />
</UserControl.DataContext>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="50*" />
<ColumnDefinition Width="50*" />
</Grid.ColumnDefinitions>
<TextBlock Text="This example demonstrates how to enable the RadAutoCompleteBox control's asynchronous FilteringBehavior. For demonstration the left RadAutoCompleteBox uses the normal FilteringBehavior and the right RadAutoCompleteBox uses the AsyncFilteringBehavior. Notice the delayed filtering of the asynchronous behavior. Both controls are bound to a collection of 100000 similar items. This behavior is designed to work with a big source set to the ItemsSource of the control."
FontWeight="Bold"
TextWrapping="Wrap"
Width="500"
Margin="20"
Grid.ColumnSpan="2" />
<StackPanel VerticalAlignment="Center"
HorizontalAlignment="Right"
Grid.Row="1"
Margin="20">
<TextBlock Text="FilteringBehavior (Default)"
VerticalAlignment="Center"
HorizontalAlignment="Center" />
<telerik:RadAutoCompleteBox ItemsSource="{Binding Items}"
DisplayMemberPath="Name"
VerticalAlignment="Center"
HorizontalAlignment="Center"
WatermarkContent="Enter 'item 1'"
Width="200"
Margin="20">
</telerik:RadAutoCompleteBox>
</StackPanel>
<StackPanel VerticalAlignment="Center"
HorizontalAlignment="Left"
Grid.Row="1"
Grid.Column="1"
Margin="20">
<TextBlock Text="AsyncFilteringBehavior"
VerticalAlignment="Center"
HorizontalAlignment="Center" />
<telerik:RadAutoCompleteBox ItemsSource="{Binding Items}"
DisplayMemberPath="Name"
VerticalAlignment="Center"
HorizontalAlignment="Center"
WatermarkContent="Enter 'item 1'"
Width="200"
Margin="20">
<telerik:RadAutoCompleteBox.FilteringBehavior>
<telerik:AsyncFilteringBehavior />
</telerik:RadAutoCompleteBox.FilteringBehavior>
</telerik:RadAutoCompleteBox>
</StackPanel>
</Grid>
</UserControl>

Просмотреть файл

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace TestApplication
{
/// <summary>
/// Interaction logic for Example.xaml
/// </summary>
public partial class Example : UserControl
{
public Example()
{
InitializeComponent();
}
}
}

Просмотреть файл

@ -0,0 +1,13 @@
<UserControl x:Class="AsynchronousFiltering.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"
xmlns:TestApplication="clr-namespace:TestApplication"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
<Grid x:Name="LayoutRoot" Background="White">
<TestApplication:Example/>
</Grid>
</UserControl>

Просмотреть файл

@ -0,0 +1,22 @@
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;
namespace AsynchronousFiltering
{
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
}
}
}

Просмотреть файл

@ -0,0 +1,9 @@
<Window x:Class="AsynchronousFiltering.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:TestApplication="clr-namespace:TestApplication"
Title="MainWindow" Height="350" Width="600">
<Grid>
<TestApplication:Example/>
</Grid>
</Window>

Просмотреть файл

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace AsynchronousFiltering
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
}
}

Просмотреть файл

@ -0,0 +1,6 @@
<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
<Deployment.Parts>
</Deployment.Parts>
</Deployment>

Просмотреть файл

@ -0,0 +1,35 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("AsynchronousFiltering")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("AsynchronousFiltering")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("2964bde0-c699-4533-a88c-560ad77f6781")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

71
AutoCompleteBox/AsynchronousFiltering/Properties/Resources.Designer.cs сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34014
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace AsynchronousFiltering.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AsynchronousFiltering.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

Просмотреть файл

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

30
AutoCompleteBox/AsynchronousFiltering/Properties/Settings.Designer.cs сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34014
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace AsynchronousFiltering.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}

Просмотреть файл

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

Просмотреть файл

@ -0,0 +1,4 @@
## How to enable asynchronous Filtering
This example demonstrates how to enable the RadAutoCompleteBox control's asynchronous FilteringBehavior. For demonstration the left RadAutoCompleteBox uses the normal FilteringBehavior and the right RadAutoCompleteBox uses the AsyncFilteringBehavior. Notice the delayed filtering of the asynchronous behavior. Both controls are bound to a collection of 100000 similar items. This behavior is designed to work with a big source set to the ItemsSource of the control.
[//]: <keywords:delay, itemssource, asyncfilteringbehavior>

Просмотреть файл

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TestApplication.ViewModels
{
public class Item
{
public string Name { get; set; }
}
}

Просмотреть файл

@ -0,0 +1,52 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Telerik.Windows.Controls;
namespace TestApplication.ViewModels
{
public class MainViewModel : ViewModelBase
{
private ObservableCollection<Item> items;
public MainViewModel()
{
this.items = GetItems(100000);
}
private static ObservableCollection<Item> GetItems(int size)
{
var result = new ObservableCollection<Item>();
for (int i = 1; i <= size; i++)
{
result.Add(new Item() { Name = string.Format("Item {0}", i) });
}
return result;
}
/// <summary>
/// Gets or sets Items and notifies for changes
/// </summary>
public ObservableCollection<Item> Items
{
get
{
return this.items;
}
set
{
if (this.items != value)
{
this.items = value;
this.OnPropertyChanged(() => this.Items);
}
}
}
}
}

Просмотреть файл

@ -0,0 +1,125 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.40629.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NoMatchFilteringBehavior_WPF", "NoMatchFilteringBehavior\NoMatchFilteringBehavior_WPF.csproj", "{B7A1BFA7-9E77-4C68-872F-3334816071E0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TwoPropertiesFilteringBehavior_WPF", "TwoPropertiesFilteringBehavior\TwoPropertiesFilteringBehavior_WPF.csproj", "{474FFE7C-983F-487A-81A7-460CE0CA996F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenWithDropDownButton_WPF", "OpenWithDropDownButton\OpenWithDropDownButton_WPF.csproj", "{7369C81A-F5C2-4407-A78C-5F8A10EBD400}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomDropDownItemTemplate_WPF", "CustomDropDownItemTemplate\CustomDropDownItemTemplate_WPF.csproj", "{E5EF8447-4813-423F-A7AB-5F08D14352F7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WithGridView_WPF", "WithGridView\WithGridView_WPF.csproj", "{C67ED566-5207-4AF7-A803-043859442003}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WithDataForm_WPF", "WithDataForm\WithDataForm_WPF.csproj", "{4A831362-CDC5-45EC-8CA7-2566B75D2F12}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HighlightMatchingItemsText_WPF", "HighlightMatchingItemsText_WPF\HighlightMatchingItemsText_WPF.csproj", "{AEFA23DE-1248-463B-92A9-0B5936A8369D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddNewItemsWithButton_WPF", "AddNewItemsWithButton\AddNewItemsWithButton_WPF.csproj", "{052E1B45-DF3A-4D11-8F9F-54E828CFCB00}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinimumPopulateDelay_WPF", "MinimumPopulateDelay\MinimumPopulateDelay_WPF.csproj", "{265C4222-5F79-4F4F-8428-1842FC0B487D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomHighlightBehavior_WPF", "CustomHighlightBehavior\CustomHighlightBehavior_WPF.csproj", "{57A5654E-E7C3-4596-8EBA-D8EDE3F4D2D2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AsynchronousFiltering_WPF", "AsynchronousFiltering\AsynchronousFiltering_WPF.csproj", "{885922CC-C114-4195-9D31-03AECD27408E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DifferentlyColoredSelectedBoxes_WPF", "MultiColorBoxesItems\DifferentlyColoredSelectedBoxes_WPF.csproj", "{AE048560-E20D-4699-9646-FC89623A39D2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SingleSelectionModeWithClearButton_WPF", "SingleSelectionModeWithClearButton\SingleSelectionModeWithClearButton_WPF.csproj", "{E238E4EB-B5BC-490C-A280-480DC9F7B54B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomBoxesItemTemplate_WPF", "CustomBoxesItemTemplate\CustomBoxesItemTemplate_WPF.csproj", "{D075E541-4676-47D3-B723-5B30B4FCB030}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataValidation_WPF", "DataValidation\DataValidation_WPF.csproj", "{AC50D323-F9AA-4F0E-9AF4-6649707FB42F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RestrictInputToOnlyExistingItems_WPF", "RestrictInputToOnlyExistingItems\RestrictInputToOnlyExistingItems_WPF.csproj", "{C9977D98-B62B-4955-A93E-D6CD9222D603}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinimumInputPrefixLengthBeforeFiltering_WPF", "MinimumInputPrefixLengthBeforeFiltering\MinimumInputPrefixLengthBeforeFiltering_WPF.csproj", "{3EE7C771-C4C7-4B60-94FE-E7F501FF8D82}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grouping_WPF", "Grouping\Grouping_WPF.csproj", "{8957580A-927C-4C75-AC04-DDB3C4A9B7EA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B7A1BFA7-9E77-4C68-872F-3334816071E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B7A1BFA7-9E77-4C68-872F-3334816071E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B7A1BFA7-9E77-4C68-872F-3334816071E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B7A1BFA7-9E77-4C68-872F-3334816071E0}.Release|Any CPU.Build.0 = Release|Any CPU
{474FFE7C-983F-487A-81A7-460CE0CA996F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{474FFE7C-983F-487A-81A7-460CE0CA996F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{474FFE7C-983F-487A-81A7-460CE0CA996F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{474FFE7C-983F-487A-81A7-460CE0CA996F}.Release|Any CPU.Build.0 = Release|Any CPU
{7369C81A-F5C2-4407-A78C-5F8A10EBD400}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7369C81A-F5C2-4407-A78C-5F8A10EBD400}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7369C81A-F5C2-4407-A78C-5F8A10EBD400}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7369C81A-F5C2-4407-A78C-5F8A10EBD400}.Release|Any CPU.Build.0 = Release|Any CPU
{E5EF8447-4813-423F-A7AB-5F08D14352F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E5EF8447-4813-423F-A7AB-5F08D14352F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E5EF8447-4813-423F-A7AB-5F08D14352F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E5EF8447-4813-423F-A7AB-5F08D14352F7}.Release|Any CPU.Build.0 = Release|Any CPU
{C67ED566-5207-4AF7-A803-043859442003}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C67ED566-5207-4AF7-A803-043859442003}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C67ED566-5207-4AF7-A803-043859442003}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C67ED566-5207-4AF7-A803-043859442003}.Release|Any CPU.Build.0 = Release|Any CPU
{4A831362-CDC5-45EC-8CA7-2566B75D2F12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4A831362-CDC5-45EC-8CA7-2566B75D2F12}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4A831362-CDC5-45EC-8CA7-2566B75D2F12}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4A831362-CDC5-45EC-8CA7-2566B75D2F12}.Release|Any CPU.Build.0 = Release|Any CPU
{AEFA23DE-1248-463B-92A9-0B5936A8369D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AEFA23DE-1248-463B-92A9-0B5936A8369D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AEFA23DE-1248-463B-92A9-0B5936A8369D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AEFA23DE-1248-463B-92A9-0B5936A8369D}.Release|Any CPU.Build.0 = Release|Any CPU
{052E1B45-DF3A-4D11-8F9F-54E828CFCB00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{052E1B45-DF3A-4D11-8F9F-54E828CFCB00}.Debug|Any CPU.Build.0 = Debug|Any CPU
{052E1B45-DF3A-4D11-8F9F-54E828CFCB00}.Release|Any CPU.ActiveCfg = Release|Any CPU
{052E1B45-DF3A-4D11-8F9F-54E828CFCB00}.Release|Any CPU.Build.0 = Release|Any CPU
{265C4222-5F79-4F4F-8428-1842FC0B487D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{265C4222-5F79-4F4F-8428-1842FC0B487D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{265C4222-5F79-4F4F-8428-1842FC0B487D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{265C4222-5F79-4F4F-8428-1842FC0B487D}.Release|Any CPU.Build.0 = Release|Any CPU
{57A5654E-E7C3-4596-8EBA-D8EDE3F4D2D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{57A5654E-E7C3-4596-8EBA-D8EDE3F4D2D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{57A5654E-E7C3-4596-8EBA-D8EDE3F4D2D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{57A5654E-E7C3-4596-8EBA-D8EDE3F4D2D2}.Release|Any CPU.Build.0 = Release|Any CPU
{885922CC-C114-4195-9D31-03AECD27408E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{885922CC-C114-4195-9D31-03AECD27408E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{885922CC-C114-4195-9D31-03AECD27408E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{885922CC-C114-4195-9D31-03AECD27408E}.Release|Any CPU.Build.0 = Release|Any CPU
{AE048560-E20D-4699-9646-FC89623A39D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AE048560-E20D-4699-9646-FC89623A39D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AE048560-E20D-4699-9646-FC89623A39D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AE048560-E20D-4699-9646-FC89623A39D2}.Release|Any CPU.Build.0 = Release|Any CPU
{E238E4EB-B5BC-490C-A280-480DC9F7B54B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E238E4EB-B5BC-490C-A280-480DC9F7B54B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E238E4EB-B5BC-490C-A280-480DC9F7B54B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E238E4EB-B5BC-490C-A280-480DC9F7B54B}.Release|Any CPU.Build.0 = Release|Any CPU
{D075E541-4676-47D3-B723-5B30B4FCB030}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D075E541-4676-47D3-B723-5B30B4FCB030}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D075E541-4676-47D3-B723-5B30B4FCB030}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D075E541-4676-47D3-B723-5B30B4FCB030}.Release|Any CPU.Build.0 = Release|Any CPU
{AC50D323-F9AA-4F0E-9AF4-6649707FB42F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AC50D323-F9AA-4F0E-9AF4-6649707FB42F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AC50D323-F9AA-4F0E-9AF4-6649707FB42F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AC50D323-F9AA-4F0E-9AF4-6649707FB42F}.Release|Any CPU.Build.0 = Release|Any CPU
{C9977D98-B62B-4955-A93E-D6CD9222D603}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C9977D98-B62B-4955-A93E-D6CD9222D603}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C9977D98-B62B-4955-A93E-D6CD9222D603}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C9977D98-B62B-4955-A93E-D6CD9222D603}.Release|Any CPU.Build.0 = Release|Any CPU
{3EE7C771-C4C7-4B60-94FE-E7F501FF8D82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3EE7C771-C4C7-4B60-94FE-E7F501FF8D82}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3EE7C771-C4C7-4B60-94FE-E7F501FF8D82}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3EE7C771-C4C7-4B60-94FE-E7F501FF8D82}.Release|Any CPU.Build.0 = Release|Any CPU
{8957580A-927C-4C75-AC04-DDB3C4A9B7EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8957580A-927C-4C75-AC04-DDB3C4A9B7EA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8957580A-927C-4C75-AC04-DDB3C4A9B7EA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8957580A-927C-4C75-AC04-DDB3C4A9B7EA}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Просмотреть файл

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>

Просмотреть файл

@ -0,0 +1,8 @@
<Application x:Class="CustomBoxesItemTemplate.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>

Просмотреть файл

@ -0,0 +1,11 @@
using System.Windows;
namespace CustomBoxesItemTemplate
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}

Просмотреть файл

@ -0,0 +1,14 @@

namespace CustomBoxesItemTemplate
{
public enum Continent
{
Europe,
Africa,
Asia,
NorthAmerica,
SouthAmerica,
Australia,
Antarctica
}
}

Просмотреть файл

@ -0,0 +1,41 @@
using System;
using System.Windows.Data;
using System.Windows.Media;
namespace CustomBoxesItemTemplate
{
public class ContinentToColorConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
var continent = (value as Country).Continent;
switch (continent)
{
case Continent.Europe:
return new SolidColorBrush(Colors.Blue);
case Continent.Africa:
return new SolidColorBrush(Colors.Magenta);
case Continent.Asia:
return new SolidColorBrush(Colors.Orange);
case Continent.NorthAmerica:
return new SolidColorBrush(Colors.Green);
case Continent.SouthAmerica:
return new SolidColorBrush(Colors.Red);
case Continent.Australia:
return new SolidColorBrush(Colors.Purple);
case Continent.Antarctica:
return new SolidColorBrush(Colors.Gray);
default:
break;
}
return Colors.White;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
}
}

Просмотреть файл

@ -0,0 +1,14 @@

namespace CustomBoxesItemTemplate
{
public class Country
{
public string Name { get; set; }
public string Capital { get; set; }
public Continent Continent { get; set; }
public string Flag { get; set; }
}
}

Просмотреть файл

@ -0,0 +1,149 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D075E541-4676-47D3-B723-5B30B4FCB030}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CustomBoxesItemTemplate</RootNamespace>
<AssemblyName>CustomBoxesItemTemplate</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="Telerik.Windows.Controls">
<HintPath>$(TELERIKWPFDIR)\Binaries\WPF40\Telerik.Windows.Controls.dll</HintPath>
</Reference>
<Reference Include="Telerik.Windows.Controls.Input">
<HintPath>$(TELERIKWPFDIR)\Binaries\WPF40\Telerik.Windows.Controls.Input.dll</HintPath>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="ContinentToColorConverter.cs" />
<Compile Include="ViewModel.cs" />
<Page Include="Example.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="Continent.cs" />
<Compile Include="Country.cs" />
<Compile Include="Example.xaml.cs">
<DependentUpon>Example.xaml</DependentUpon>
</Compile>
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\ar.png" />
<Resource Include="Images\au.png" />
<Resource Include="Images\bg.png" />
<Resource Include="Images\br.png" />
<Resource Include="Images\ca.png" />
<Resource Include="Images\cn.png" />
<Resource Include="Images\de.png" />
<Resource Include="Images\dk.png" />
<Resource Include="Images\eg.png" />
<Resource Include="Images\fr.png" />
<Resource Include="Images\in.png" />
<Resource Include="Images\it.png" />
<Resource Include="Images\jp.png" />
<Resource Include="Images\ng.png" />
<Resource Include="Images\no.png" />
<Resource Include="Images\ru.png" />
<Resource Include="Images\sp.png" />
<Resource Include="Images\uk.png" />
<Resource Include="Images\usa.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Readme.md" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Просмотреть файл

@ -0,0 +1,75 @@
<UserControl x:Class="CustomBoxesItemTemplate.Example"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:local="clr-namespace:CustomBoxesItemTemplate"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<UserControl.Resources>
<local:ContinentToColorConverter x:Key="ContinentToColorConverter"/>
<DataTemplate x:Key="CustomBoxesItemTemplate">
<StackPanel Orientation="Horizontal">
<Image Width="14"
Height="12"
Margin="2"
Source="{Binding Flag}" />
<TextBlock Foreground="{Binding Converter={StaticResource ContinentToColorConverter}}"
Margin="2"
FontWeight="Bold"
Text="{Binding Name}" />
</StackPanel>
</DataTemplate>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Text="This example demonstrates how to create a custom BoxesItemTemplate for RadAutoCompleteBox control in Silverlight and WPF."
Grid.Row="0"
FontSize="16"
TextWrapping="Wrap"
HorizontalAlignment="Center"
Margin="10"/>
<TextBlock Text="Select a country (Type B for example):"
Grid.Row="1"
FontSize="16"
Margin="20 5"
FontStyle="Italic"
HorizontalAlignment="Left"/>
<telerik:RadAutoCompleteBox Grid.Row="2"
Margin="20 0"
ItemsSource="{Binding Countries}"
DisplayMemberPath="Name"
BoxesItemTemplate="{StaticResource CustomBoxesItemTemplate}"/>
<TextBlock Text="Continents:"
Grid.Row="3"
FontSize="16"
FontStyle="Italic"
Margin="20 10 20 0"
HorizontalAlignment="Left"/>
<telerik:RadLegend Grid.Row="4"
Margin="20 0"
FontSize="14"
FontStyle="Italic"
HorizontalAlignment="Left">
<telerik:RadLegend.Items>
<telerik:LegendItemCollection>
<telerik:LegendItem MarkerFill="Blue" Title="Europe"/>
<telerik:LegendItem MarkerFill="Magenta" Title="Africa" />
<telerik:LegendItem MarkerFill="Green" Title="NorthAmerica"/>
<telerik:LegendItem MarkerFill="Red" Title="SouthAmerica"/>
<telerik:LegendItem MarkerFill="Orange" Title="Asia"/>
<telerik:LegendItem MarkerFill="Purple" Title="Australia"/>
<telerik:LegendItem MarkerFill="Gray" Title="Antarctica" />
</telerik:LegendItemCollection>
</telerik:RadLegend.Items>
</telerik:RadLegend>
</Grid>
</UserControl>

Просмотреть файл

@ -0,0 +1,17 @@
using System.Windows.Controls;
namespace CustomBoxesItemTemplate
{
/// <summary>
/// Interaction logic for Example.xaml
/// </summary>
public partial class Example : UserControl
{
public Example()
{
InitializeComponent();
this.DataContext = new ViewModel();
}
}
}

Двоичные данные
AutoCompleteBox/CustomBoxesItemTemplate/Images/ar.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 506 B

Двоичные данные
AutoCompleteBox/CustomBoxesItemTemplate/Images/au.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 673 B

Двоичные данные
AutoCompleteBox/CustomBoxesItemTemplate/Images/bg.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 462 B

Двоичные данные
AutoCompleteBox/CustomBoxesItemTemplate/Images/br.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 526 B

Двоичные данные
AutoCompleteBox/CustomBoxesItemTemplate/Images/ca.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 628 B

Двоичные данные
AutoCompleteBox/CustomBoxesItemTemplate/Images/cn.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 472 B

Двоичные данные
AutoCompleteBox/CustomBoxesItemTemplate/Images/de.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 545 B

Двоичные данные
AutoCompleteBox/CustomBoxesItemTemplate/Images/dk.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 495 B

Двоичные данные
AutoCompleteBox/CustomBoxesItemTemplate/Images/eg.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 465 B

Двоичные данные
AutoCompleteBox/CustomBoxesItemTemplate/Images/fr.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 527 B

Двоичные данные
AutoCompleteBox/CustomBoxesItemTemplate/Images/in.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 503 B

Двоичные данные
AutoCompleteBox/CustomBoxesItemTemplate/Images/it.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 420 B

Двоичные данные
AutoCompleteBox/CustomBoxesItemTemplate/Images/jp.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 420 B

Двоичные данные
AutoCompleteBox/CustomBoxesItemTemplate/Images/ng.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 482 B

Двоичные данные
AutoCompleteBox/CustomBoxesItemTemplate/Images/no.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 512 B

Двоичные данные
AutoCompleteBox/CustomBoxesItemTemplate/Images/ru.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 420 B

Двоичные данные
AutoCompleteBox/CustomBoxesItemTemplate/Images/sp.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 401 B

Двоичные данные
AutoCompleteBox/CustomBoxesItemTemplate/Images/uk.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 530 B

Двоичные данные
AutoCompleteBox/CustomBoxesItemTemplate/Images/usa.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 392 B

Просмотреть файл

@ -0,0 +1,13 @@
<UserControl x:Class="CustomBoxesItemTemplate.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"
xmlns:local="clr-namespace:CustomBoxesItemTemplate"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
<Grid x:Name="LayoutRoot" Background="White">
<local:Example/>
</Grid>
</UserControl>

Просмотреть файл

@ -0,0 +1,12 @@
using System.Windows.Controls;
namespace CustomBoxesItemTemplate
{
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
}
}
}

Просмотреть файл

@ -0,0 +1,9 @@
<Window x:Class="CustomBoxesItemTemplate.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:CustomBoxesItemTemplate"
Title="MainWindow" Height="410" Width="525">
<Grid>
<local:Example/>
</Grid>
</Window>

Просмотреть файл

@ -0,0 +1,15 @@
using System.Windows;
namespace CustomBoxesItemTemplate
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
}
}

Просмотреть файл

@ -0,0 +1,6 @@
<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
<Deployment.Parts>
</Deployment.Parts>
</Deployment>

Просмотреть файл

@ -0,0 +1,35 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CustomBoxesItemTemplate")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CustomBoxesItemTemplate")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("0d694e23-a1f0-4790-9c99-c2d418477619")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

71
AutoCompleteBox/CustomBoxesItemTemplate/Properties/Resources.Designer.cs сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34209
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CustomBoxesItemTemplate.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CustomBoxesItemTemplate.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

Просмотреть файл

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

30
AutoCompleteBox/CustomBoxesItemTemplate/Properties/Settings.Designer.cs сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34209
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CustomBoxesItemTemplate.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}

Просмотреть файл

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

Просмотреть файл

@ -0,0 +1,4 @@
## Custom BoxesItemTemplate
This example demonstrates how to create a custom BoxesItemTemplate for RadAutoCompleteBox control in Silverlight and WPF.
[//]: <keywords:customization>

Просмотреть файл

@ -0,0 +1,35 @@
using System.Collections.ObjectModel;
namespace CustomBoxesItemTemplate
{
public class ViewModel
{
public ObservableCollection<Country> Countries { get; set; }
public ViewModel()
{
this.Countries = new ObservableCollection<Country>()
{
new Country() { Name = "Australia", Capital = "Canberra", Continent = Continent.Australia, Flag = "Images/au.png" },
new Country() { Name = "Bulgaria", Capital = "Sofia", Continent = Continent.Europe, Flag = "Images/bg.png" },
new Country() { Name = "Canada", Capital = "Ottawa", Continent = Continent.NorthAmerica, Flag = "Images/ca.png" },
new Country() { Name = "Denmark", Capital = "Copenhagen", Continent = Continent.Europe, Flag = "Images/dk.png" },
new Country() { Name = "France", Capital = "Paris", Continent = Continent.Europe, Flag = "Images/fr.png" },
new Country() { Name = "Germany", Capital = "Berlin", Continent = Continent.Europe, Flag = "Images/de.png" },
new Country() { Name = "India", Capital = "New Delhi", Continent = Continent.Asia, Flag = "Images/in.png" },
new Country() { Name = "Italy", Capital = "Rome", Continent = Continent.Europe, Flag = "Images/it.png" },
new Country() { Name = "Norway", Capital = "Oslo", Continent = Continent.Europe, Flag = "Images/no.png" },
new Country() { Name = "Russia", Capital = "Moscow", Continent = Continent.Europe, Flag = "Images/ru.png" },
new Country() { Name = "Spain ", Capital = "Madrid", Continent = Continent.Europe, Flag = "Images/sp.png" },
new Country() { Name = "United Kingdom", Capital = "London", Continent = Continent.Europe, Flag = "Images/uk.png" },
new Country() { Name = "United States", Capital = "Washington, D.C.", Continent = Continent.NorthAmerica, Flag = "Images/usa.png" },
new Country() { Name = "Nigeria", Capital = "Abuja", Continent = Continent.Africa, Flag = "Images/ng.png" },
new Country() { Name = "Egypt", Capital = "Cairo", Continent = Continent.Africa, Flag = "Images/eg.png" },
new Country() { Name = "Brazil", Capital = "Brasilia", Continent = Continent.SouthAmerica, Flag = "Images/br.png" },
new Country() { Name = "Argentina ", Capital = "Buenos Aires", Continent = Continent.SouthAmerica, Flag = "Images/ar.png" },
new Country() { Name = "China", Capital = "Beijing", Continent = Continent.Asia, Flag = "Images/cn.png" },
new Country() { Name = "Japan", Capital = "Tokyo", Continent = Continent.Asia, Flag = "Images/jp.png" },
};
}
}
}

Просмотреть файл

@ -0,0 +1,8 @@
<Application x:Class="CustomDropDownItemTemplate.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>

Просмотреть файл

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
namespace CustomDropDownItemTemplate
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}

Просмотреть файл

@ -0,0 +1,12 @@

namespace CustomDropDownItemTemplate
{
public class Country
{
public string Name { get; set; }
public string Capital { get; set; }
public int Id { get; set; }
}
}

Просмотреть файл

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{E5EF8447-4813-423F-A7AB-5F08D14352F7}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CustomDropDownItemTemplate</RootNamespace>
<AssemblyName>CustomDropDownItemTemplate</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="Telerik.Windows.Controls">
<HintPath>$(TELERIKWPFDIR)\Binaries\WPF40\Telerik.Windows.Controls.dll</HintPath>
</Reference>
<Reference Include="Telerik.Windows.Controls.Input">
<HintPath>$(TELERIKWPFDIR)\Binaries\WPF40\Telerik.Windows.Controls.Input.dll</HintPath>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="ViewModel.cs" />
<Page Include="Example.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="Country.cs" />
<Compile Include="Example.xaml.cs">
<DependentUpon>Example.xaml</DependentUpon>
</Compile>
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup>
<Resource Include="Readme.md" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Просмотреть файл

@ -0,0 +1,63 @@
<UserControl x:Class="CustomDropDownItemTemplate.Example"
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"
xmlns:local="clr-namespace:CustomDropDownItemTemplate"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
<UserControl.Resources>
<local:ViewModel x:Key="ViewModel"/>
<DataTemplate x:Key="CustomDropDownItemTemplate">
<Border BorderBrush="Gray" BorderThickness="1" Margin="2">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Grid.Column="0" Grid.Row="0"
Margin="5"
FontWeight="Bold"
Text="Name" />
<TextBlock Grid.Row="0" Grid.Column="1" Margin="0 5 0 0"
Text=":"
FontWeight="Bold"/>
<TextBlock Grid.Column="2" Grid.Row="0" Margin="5"
Text="{Binding Name}" />
<Border BorderBrush="Gray" BorderThickness="0.5" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3"/>
<TextBlock Grid.Column="0" Grid.Row="2" Margin="5"
FontWeight="Bold"
Text="Capital" />
<TextBlock Grid.Row="2" Grid.Column="1" Margin="0 5 0 0"
Text=":"
FontWeight="Bold"/>
<TextBlock Grid.Column="2" Grid.Row="2" Margin="5"
Text="{Binding Capital}" />
</Grid>
</Border>
</DataTemplate>
</UserControl.Resources>
<Grid x:Name="LayoutRoot" Background="White" DataContext="{StaticResource ViewModel}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="This example demonstrates how to create a custom DropDownItemTemplate for the RadAutoCompleteBox control."
FontWeight="Bold" TextWrapping="Wrap" Width="300" Margin="20"/>
<telerik:RadAutoCompleteBox ItemsSource="{Binding Countries}"
VerticalAlignment="Center" HorizontalAlignment="Center"
Margin="20" Grid.Row="1"
Width="200"
DisplayMemberPath="Name"
DropDownItemTemplate="{StaticResource CustomDropDownItemTemplate}"/>
</Grid>
</UserControl>

Просмотреть файл

@ -0,0 +1,12 @@
using System.Windows.Controls;
namespace CustomDropDownItemTemplate
{
public partial class Example : UserControl
{
public Example()
{
InitializeComponent();
}
}
}

Просмотреть файл

@ -0,0 +1,13 @@
<UserControl x:Class="CustomDropDownItemTemplate.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"
xmlns:local="clr-namespace:CustomDropDownItemTemplate"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
<Grid x:Name="LayoutRoot" Background="White">
<local:Example/>
</Grid>
</UserControl>

Просмотреть файл

@ -0,0 +1,12 @@
using System.Windows.Controls;
namespace CustomDropDownItemTemplate
{
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
}
}
}

Просмотреть файл

@ -0,0 +1,9 @@
<Window x:Class="CustomDropDownItemTemplate.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:CustomDropDownItemTemplate"
Title="MainWindow" Height="350" Width="525">
<Grid>
<local:Example/>
</Grid>
</Window>

Просмотреть файл

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace CustomDropDownItemTemplate
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
}
}

Просмотреть файл

@ -0,0 +1,6 @@
<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
<Deployment.Parts>
</Deployment.Parts>
</Deployment>

Просмотреть файл

@ -0,0 +1,35 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CustomDropDownItemTemplate")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CustomDropDownItemTemplate")]
[assembly: AssemblyCopyright("Copyright © 2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("bc6c83d9-4113-45b9-927b-895edaf4443d")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

Просмотреть файл

@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18010
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CustomDropDownItemTemplate.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CustomDropDownItemTemplate.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

Просмотреть файл

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

Просмотреть файл

@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18010
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CustomDropDownItemTemplate.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}

Просмотреть файл

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

Просмотреть файл

@ -0,0 +1,4 @@
## Custom Drop Down Item Template
This example demonstrates how to create a custom DropDownItemTemplate for the RadAutoCompleteBox control in Silverlight and WPF.
[//]: <keywords:dropdownitemtemplate, customization>

Просмотреть файл

@ -0,0 +1,29 @@
using System.Collections.ObjectModel;
namespace CustomDropDownItemTemplate
{
public class ViewModel
{
public ObservableCollection<Country> Countries { get; set; }
public ViewModel()
{
this.Countries = new ObservableCollection<Country>()
{
new Country() { Name = "Australia", Capital = "Canberra", Id = 1 },
new Country() { Name = "Bulgaria", Capital = "Sofia" , Id = 2 },
new Country() { Name = "Canada", Capital = "Ottawa" , Id = 3 },
new Country() { Name = "Denmark", Capital = "Copenhagen" , Id = 4 },
new Country() { Name = "France", Capital = "Paris" , Id = 5 },
new Country() { Name = "Germany", Capital = "Berlin" , Id = 6 },
new Country() { Name = "India", Capital = "New Delhi" , Id = 7 },
new Country() { Name = "Italy", Capital = "Rome" , Id = 8 },
new Country() { Name = "Norway", Capital = "Oslo" , Id = 9 },
new Country() { Name = "Russia", Capital = "Moscow" , Id = 10 },
new Country() { Name = "Spain ", Capital = "Madrid" , Id = 11 },
new Country() { Name = "United Kingdom", Capital = "London" , Id = 12 },
new Country() { Name = "United States", Capital = "Washington, D.C." , Id = 13 },
};
}
}
}

Просмотреть файл

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>

Просмотреть файл

@ -0,0 +1,8 @@
<Application x:Class="CustomHighlightBehavior.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>

Просмотреть файл

@ -0,0 +1,11 @@
using System.Windows;
namespace CustomHighlightBehavior
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше