Пример #1
0
        /// <summary>
        /// Internal handler for item selected event.
        /// </summary>
        /// <param name="control">Event source.</param>
        protected override void OnItemSelected(ControlBase control, ItemSelectedEventArgs args)
        {
            if (!IsDisabled)
            {
                MenuItem item = control as MenuItem;
                if (null == item)
                {
                    return;
                }

                m_TextBox.Text = item.Text;
            }

            base.OnItemSelected(control, args);
        }
Пример #2
0
        /// <summary>
        /// Handler for the row selection event.
        /// </summary>
        /// <param name="control">Event source.</param>
        protected virtual void OnRowSelected(ControlBase control, ItemSelectedEventArgs args)
        {
            // [omeg] changed default behavior
            bool       clear = false;// !InputHandler.InputHandler.IsShiftDown;
            ListBoxRow row   = args.SelectedItem as ListBoxRow;

            if (row == null)
            {
                return;
            }

            if (row.IsSelected)
            {
                if (IsToggle)
                {
                    UnselectRow(row);
                }
            }
            else
            {
                SelectRow(row, clear);
            }
        }