IUIControl Interface
Represents base requirements for a custom user interface control.
public interface IUIControl : IUIElement, ILogicalTreeNode, IDpiAwareElement, IDisposable
Properties
Capture
Gets or sets a value indicating whether the control has captured the mouse.
bool Capture { get; set; }
Property Value
- bool:
true
if the control has captured the mouse; otherwise,false
.
IsPaintValid
Gets whether the control has rendered itself and doesn't have any invalidated paint regions.
bool IsPaintValid { get; }
Property Value
- bool:
true
if the control has rendered itself and doesn't have any invalidated paint regions; otherwise,false
.
MouseCaptureElement
Indicates the IUIElement for which mouse capture is being performed.
IUIElement MouseCaptureElement { get; set; }
Property Value
- IUIElement:
The IUIElement for which mouse capture is being performed.
Methods
AddPendingGraphicsInversion(Rectangle)
Inverts the canvas using XOR at the end of the current or next drawing operation.
bool AddPendingGraphicsInversion(Rectangle bounds)
Parameter | Type | Description |
---|---|---|
bounds | Rectangle | A |
Returns
- bool:
true
if the inversion operation was added successfully; otherwise,false
.
AddPendingScrollOperation(Rectangle, int, int)
Scrolls the canvas the specified amount at the beginning of the next drawing operation.
bool AddPendingScrollOperation(Rectangle bounds, int xAmount, int yAmount)
Parameter | Type | Description |
---|---|---|
bounds | Rectangle | The bounds to scroll. |
xAmount | int | The amount to scroll horizontally. |
yAmount | int | The amount to scroll vertically. |
Returns
- bool:
true
if the scroll operation was added successfully; otherwise,false
.
AddPendingScrollOperation(Rectangle, Orientation, int)
Scrolls the canvas the specified amount at the beginning of the next drawing operation.
bool AddPendingScrollOperation(Rectangle bounds, Orientation orientation, int amount)
Parameter | Type | Description |
---|---|---|
bounds | Rectangle | The bounds to scroll. |
orientation | Orientation | The direction to scroll. |
amount | int | The amount to scroll. |
Returns
- bool:
true
if the scroll operation was added successfully; otherwise,false
.
AddToInvalidatedRegion(Rectangle)
Adds a Rectangle
to the invalidated region.
void AddToInvalidatedRegion(Rectangle rect)
Parameter | Type | Description |
---|---|---|
rect | Rectangle | The |
ResetDoubleBufferCanvas(bool)
Resets the double-buffer canvas.
void ResetDoubleBufferCanvas(bool recurse)
Parameter | Type | Description |
---|---|---|
recurse | bool | Whether to recurse down into the child control tree. |
Inherited Members
- IUIElement.Arrange(Rectangle)
- IUIElement.ContainsLocation(Point)
- IUIElement.CreateGraphics()
- IUIElement.GetDrawState()
- IUIElement.HitTest(PointHitTestParameters)
- IUIElement.HitTest(PointHitTestParameters, Func<IUIElement, PointHitTestParameters, bool>)
- IUIElement.HitTestRecursive(PointHitTestParameters)
- IUIElement.HitTestRecursive(PointHitTestParameters, Func<IUIElement, PointHitTestParameters, bool>)
- IUIElement.Invalidate(InvalidationLevels, InvalidationTypes)
- IUIElement.InvalidateArrange()
- IUIElement.InvalidateMeasure()
- IUIElement.Measure(Graphics, Size)
- IUIElement.NotifyChildDesiredSizeChanged()
- IUIElement.NotifyMouseLeaveEvent()
- IUIElement.Render(PaintEventArgs)
- IUIElement.TransformToAncestor(IUIElement)
- IUIElement.TransformToDescendant(IUIElement)
- IUIElement.ActualHeight
- IUIElement.ActualWidth
- IUIElement.Bounds
- IUIElement.ClipBounds
- IUIElement.DesiredSize
- IUIElement.IsArrangeValid
- IUIElement.IsMeasureValid
- IUIElement.IsRightToLeft
- IUIElement.Size
- IUIElement.Visibility
- IUIElement.VisualOffset
- ILogicalTreeNode.FindAncestor(Type)
- ILogicalTreeNode.GetCommonAncestor(ILogicalTreeNode)
- ILogicalTreeNode.IsAncestorOf(ILogicalTreeNode)
- ILogicalTreeNode.IsDescendantOf(ILogicalTreeNode)
- ILogicalTreeNode.Children
- ILogicalTreeNode.Parent
- IDpiAwareElement.DpiScaleChanged(SizeF)
- IDpiAwareElement.DpiScaleFactor
- IDisposable.Dispose()
Extension Methods
- DpiAwareElementExtensions.AutoScaleFont(IDpiAwareElement, Font)
- DpiAwareElementExtensions.AutoScaleFontSize(IDpiAwareElement, float)
- DpiAwareElementExtensions.ScaleLogicalValue(IDpiAwareElement, Padding)
- DpiAwareElementExtensions.ScaleLogicalValue(IDpiAwareElement, Point)
- DpiAwareElementExtensions.ScaleLogicalValue(IDpiAwareElement, Rectangle)
- DpiAwareElementExtensions.ScaleLogicalValue(IDpiAwareElement, Size)
- DpiAwareElementExtensions.ScaleLogicalValue(IDpiAwareElement, SizeF)
- DpiAwareElementExtensions.ScaleLogicalValue(IDpiAwareElement, int)
- DpiAwareElementExtensions.ScaleLogicalValue(IDpiAwareElement, float)
- DpiAwareElementExtensions.ScaleLogicalValue(IDpiAwareElement, Padding)
- DpiAwareElementExtensions.SynchronizeScaleFactorWithChildren(IDpiAwareElement)