Exemplo n.º 1
0
        public void RaisePostBackEvent(string eventArgument)
        {
            this.SetSelectedItem(eventArgument);

            if (this._selectedTabItem != null)
            {
                TabItemClickedEventArgs eventArgs =
                    new TabItemClickedEventArgs(_selectedTabItem, _lastSelectedTabItem);

                OnTabItemClicked(eventArgs);

                if (eventArgs.Cancel)
                {
                    this._selectedTabItem.Selected = false;

                    if (this._lastSelectedTabItem != null)
                        this._lastSelectedTabItem.Selected = true;

                    this._selectedTabItem = this._lastSelectedTabItem;
                }
            }
        }
Exemplo n.º 2
0
        private void OnTabItemClicked(TabItemClickedEventArgs e)
        {
            ItemClickedHandler tabItemClickedEventDelegate = (ItemClickedHandler)Events[tabItemClickedEvent];

            if (tabItemClickedEventDelegate != null)
            {
                tabItemClickedEventDelegate(this, e);
            }
        }