private void InitializeSuperTipFromCode() { SuperTip tip = new SuperTip(); SuperTipControl tipControl = new SuperTipControl(); tipControl.SuperTip = tip; SuperTipHeaderItem header = new SuperTipHeaderItem(); header.Content = "New"; SuperTipItem item = new SuperTipItem(); item.Content = "Create a new document"; SuperTipItem item2 = new SuperTipItem(); item2.Content = "Opens a new document in a new tab"; tip.Items.Add(header); tip.Items.Add(item); tip.Items.Add(new SuperTipItemSeparator()); tip.Items.Add(item2); FrameworkElementHelper.SetToolTip(stdBtn, tipControl); barBtn.SuperTip = tip; bNewCode.SuperTip = tip; }
public SuperTipFromCodeForStandardControls() { InitializeComponent(); SuperTip tip = new SuperTip(); SuperTipControl tipControl = new SuperTipControl(); tipControl.SuperTip = tip; SuperTipHeaderItem header = new SuperTipHeaderItem(); header.Content = "New"; SuperTipItem item = new SuperTipItem(); item.Content = "Create a new document"; SuperTipItem item2 = new SuperTipItem(); item2.Content = "Opens a new document in a new tab"; tip.Items.Add(header); tip.Items.Add(item); tip.Items.Add(new SuperTipItemSeparator()); tip.Items.Add(item2); bt.ToolTip = tipControl; }