-
Notifications
You must be signed in to change notification settings - Fork 940
/
PropertyValueUIItem.cs
37 lines (31 loc) · 1.74 KB
/
PropertyValueUIItem.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#nullable disable
namespace System.Drawing.Design
{
/// <summary>
/// Provides information about the property value UI including the invoke handler, tool tip and glyph icon.
/// </summary>
public class PropertyValueUIItem
{
/// <summary>Constructor that accepts the necessary information to display this item.</summary>
/// <param name="uiItemImage"><see cref="Drawing.Image"/> representing the 8 x 8 icon to display.</param>
/// <param name="handler">The <see cref="PropertyValueUIItemInvokeHandler"/> to invoke when the item is double clicked.</param>
/// <param name="tooltip">The ToolTip to display for this item.</param>
public PropertyValueUIItem(Image uiItemImage, PropertyValueUIItemInvokeHandler handler, string tooltip)
{
Image = uiItemImage ?? throw new ArgumentNullException(nameof(uiItemImage));
InvokeHandler = handler ?? throw new ArgumentNullException(nameof(handler));
ToolTip = tooltip;
}
/// <summary>Gets the 8 x 8 pixel image that will be drawn on the properties window.</summary>
public virtual Image Image { get; }
/// <summary>Gets the handler that will be raised when this item is double clicked.</summary>
public virtual PropertyValueUIItemInvokeHandler InvokeHandler { get; }
/// <summary>Gets the ToolTip to display for this item.</summary>
public virtual string ToolTip { get; }
/// <summary>Resets the UI item.</summary>
public virtual void Reset() { }
}
}