Esempio n. 1
0
 internal void RaiseCanHideItem(BaseLayoutItem sender, CanHideItemEventArgs e)
 {
     if (CanHideItem != null)
     {
         CanHideItem(sender, e);
     }
 }
        private void OnCanHideItem(object sender, CanHideItemEventArgs e)
        {
            BaseLayoutItem item = sender as BaseLayoutItem;

            if (XtraMessageBox.Show(string.Format("Do you wish to hide this item ({0})? ", item.Name), "HideItemDialog", MessageBoxButtons.YesNo) != DialogResult.Yes)
            {
                e.CanHideItem = false;
            }
        }
        public override void HideToCustomization()
        {
            CanHideItemEventArgs args = new CanHideItemEventArgs(true);

            LayoutControl.RaiseCanHideItem(this, args);
            if (args.CanHideItem)
            {
                base.HideToCustomization();
            }
        }