using System.Collections.Generic;
using System.Windows.Controls;

namespace ExcelVSTOProject
{
	/// <summary>
	/// Interaction logic for UserControl1.xaml
	/// </summary>
	public partial class UserControl1 : UserControl
	{
		public UserControl1()
		{
			InitializeComponent();

			this.DataContext = new ViewModel();
		}

		private void SearchAutoCompleteBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
		{

        }
    }


	public class ViewModel
	{
		private List<Template> allTemplates;

		public List<Template> AllTemplates
		{
			get
			{
				if (this.allTemplates == null)
				{
					this.allTemplates = new List<Template>();

					for (int i = 0; i < 1000; i++)
					{
						this.allTemplates.Add(new Template() { Name = "Name " + i });
					}
				}

				return this.allTemplates;
			}
		}
    }

	public class Template
	{
		public string Name { get; set; }
	}
}
