private void CreateSampleMenuItem(MenuItem parentMenu, Sample sample)
		{
			MenuItem sampleitem = new MenuItem()
			{
				Header = sample.Name,
				ToolTip = new TextBlock() { Text = sample.Description, MaxWidth = 300, TextWrapping = TextWrapping.Wrap }
			};
			parentMenu.Items.Add(sampleitem);
			sampleitem.Click += (s, e) => { sampleitem_Click(sample, s as MenuItem); };
		}
		private void sampleitem_Click(Sample sample, MenuItem menu)
		{
			var c = sample.SampleType.GetConstructor(new Type[] { });
			var ctrl = c.Invoke(new object[] { }) as UIElement;
			
			sampleContainer.Child = ctrl;
			
			if (currentSampleMenuItem != null)
				currentSampleMenuItem.IsChecked = false;
			menu.IsChecked = true;
			
			currentSampleMenuItem = menu;
			StatusBar.DataContext = sample;
		}