XCore.SidebarAdapter.CreateUIForChoiceGroup C# (CSharp) Method

CreateUIForChoiceGroup() public method

public CreateUIForChoiceGroup ( XCore.ChoiceGroup group ) : void
group XCore.ChoiceGroup
return void
		public void CreateUIForChoiceGroup (ChoiceGroup group)
		{
			OutlookBarBand band = (OutlookBarBand) group.ReferenceWidget;

			if (band.ChildControl != null)
				FillTreeNodes(((TreeView)(band.ChildControl)).Nodes, group);
			else
			{
				band.Items.Clear();
				//doesn't make a difference: band.Click += new System.  EventHandler(group.OnDisplay);
				foreach(ChoiceRelatedClass item in group)
				{
					Debug.Assert(item is ChoiceBase, "only things that can be made into buttons should be appearing here.else, we should have a tree.");
					MakeButton(band, (ChoiceBase)item);
				}
			}
		}
		#region tree control stuff