Пример #1
0
 void ToolboxCategory_MouseLeave(object sender, MouseEventArgs e)
 {
     m_lastMouseUp = null;
     m_mouseDownCausedExpand = false;
     IsExpanded = false;
     m_longPressTimer.Stop();
 }
Пример #2
0
 // Called by ToolboxItem when it receives a MouseDown
 internal void NotifyToolboxItemMouseDown(ToolboxItem toolboxItem)
 {
     m_lastMouseUp = toolboxItem;
 }
Пример #3
0
 // Called by ToolboxItem when it receives a MouseDown
 internal void NotifyToolboxItemMouseDown(ToolboxItem toolboxItem)
 {
     m_lastMouseUp = toolboxItem;
 }
Пример #4
0
        // Called by ToolboxItem when it receives a MouseUp
        internal void NotifyToolboxItemMouseUp(ToolboxItem toolboxItem)
        {
            if (!toolboxItem.IsEnabled)
                return;

            if (SelectedItem != toolboxItem || m_lastMouseUp == toolboxItem)
            {
                var item = ItemContainerGenerator.ItemFromContainer(toolboxItem);
                SelectItem(item);

                if (ToolboxOwner != null)
                    ToolboxOwner.SetSelected(this);
            }

            IsExpanded = false; // close expander
        }
Пример #5
0
 ///  <summary>
 ///    Adds a <see cref="ToolboxItem"/> with the specified value to the
 ///    <see cref="ToolboxItemCollection"/> .
 ///  </summary>
 ///  <param name="value">The <see cref="ToolboxItem"/> to add.</param>
 ///  <returns>
 ///    The index at which the new element was inserted.
 ///  </returns>
 ///  <remarks><seealso cref="ToolboxItemCollection.AddRange"/></remarks>
 ///  <history>
 ///      [dineshc] 3/26/2003  Created
 ///  </history>
 public int Add(ToolboxItem value)
 {
     return(List.Add(value));
 }
Пример #6
0
 ///  <summary>
 ///     Removes a specific <see cref="ToolboxItem"/> from the
 ///    <see cref="ToolboxItemCollection"/> .
 ///  </summary>
 ///  <param name="value">The <see cref="ToolboxItem"/> to remove from the <see cref="ToolboxItemCollection"/> .</param>
 ///  <remarks><exception cref="System.ArgumentException"><paramref name="value"/> is not found in the Collection. </exception></remarks>
 ///  <history>
 ///      [dineshc] 3/26/2003  Created
 ///  </history>
 public void Remove(ToolboxItem value)
 {
     List.Remove(value);
 }
Пример #7
0
 ///  <summary>
 ///  Inserts a <see cref="ToolboxItem"/> into the <see cref="ToolboxItemCollection"/> at the specified index.
 ///  </summary>
 ///  <param name="index">The zero-based index where <paramref name="value"/> should be inserted.</param>
 ///  <param name=" value">The <see cref="ToolboxItem"/> to insert.</param>
 ///  <remarks><seealso cref="ToolboxItemCollection.Add"/></remarks>
 ///  <history>
 ///      [dineshc] 3/26/2003  Created
 ///  </history>
 public void Insert(int index, ToolboxItem value)
 {
     List.Insert(index, value);
 }
Пример #8
0
 ///  <summary>
 ///    Returns the index of a <see cref="ToolboxItem"/> in
 ///       the <see cref="ToolboxItemCollection"/> .
 ///  </summary>
 ///  <param name="value">The <see cref="ToolboxItem"/> to locate.</param>
 ///  <returns>
 ///  The index of the <see cref="ToolboxItem"/> of <paramref name="value"/> in the
 ///  <see cref="ToolboxItemCollection"/>, if found; otherwise, -1.
 ///  </returns>
 ///  <remarks><seealso cref="ToolboxItemCollection.Contains"/></remarks>
 ///  <history>
 ///      [dineshc] 3/26/2003  Created
 ///  </history>
 public int IndexOf(ToolboxItem value)
 {
     return(List.IndexOf(value));
 }
Пример #9
0
 ///  <summary>
 ///  Gets a value indicating whether the
 ///    <see cref="ToolboxItemCollection"/> contains the specified <see cref="ToolboxItem"/>.
 ///  </summary>
 ///  <param name="value">The <see cref="ToolboxItem"/> to locate.</param>
 ///  <returns>
 ///  <see langword="true"/> if the <see cref="ToolboxItem"/> is contained in the collection;
 ///   otherwise, <see langword="false"/>.
 ///  </returns>
 ///  <remarks><seealso cref="ToolboxItemCollection.IndexOf"/></remarks>
 ///  <history>
 ///      [dineshc] 3/26/2003  Created
 ///  </history>
 public bool Contains(ToolboxItem value)
 {
     return(List.Contains(value));
 }