WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PointerCap

    Show / Hide Table of Contents

    Class PointerCap

    Represents the pointer cap visual element that "caps" the needle pointer.

    Inheritance
    System.Object
    GaugeElement
    PointerCap
    Inherited Members
    GaugeElement.BackgroundBrushProperty
    GaugeElement.BorderBrushProperty
    GaugeElement.BorderWidthProperty
    GaugeElement.BackgroundBrush
    GaugeElement.BorderBrush
    GaugeElement.BorderWidth
    Namespace: Syncfusion.Windows.Gauge
    Assembly: Syncfusion.Gauge.WPF.dll
    Syntax
    public class PointerCap : GaugeElement
    Remarks

    PointerCap is allowed only for Needle type pointer.

    Examples
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    using System;
    using System.Windows;
    using System.Windows.Controls;
    using Syncfusion.Windows.Shared;
    using Syncfusion.Windows.Gauge;

    namespace PointerCapSample { public partial class Window1 : Window { private CircularScale m_scale; private CircularGauge m_gauge; public Window1() { InitializeComponent();

    m_scale = new CircularScale(); m_gauge = new CircularGauge(); m_scale.Radius = 116; this.m_gauge.Scales.Add(m_scale); m_scale.PointerCap.PointerCapRadius = 5; m_scale.PointerCap.BackgroundBrush = new RadialGradientBrush(Color.FromRgb(194, 207, 229), Color.FromRgb(46, 94, 160)); CircularPointer pointer1 = new CircularPointer(); pointer1.BackgroundBrush = Brushes.Orange; pointer1.BorderBrush = Brushes.Black; pointer1.PointerLength = 100; pointer1.PointerWidth = 10; pointer1.PointerPlacement = ScalePlacement.Outside; m_scale.Pointers.Add(pointer1); this.Content = m_gauge; } } }

    Constructors

    PointerCap()

    Initializes a new instance of the PointerCap class.

    Declaration
    public PointerCap()

    Fields

    CapOnTopProperty

    Identifies the CapOnTop dependency property.

    Declaration
    public static readonly DependencyProperty CapOnTopProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    PointerCapCustomGeometryProperty

    Identifies the PointerCapCustomGeometryProperty dependency property.

    Declaration
    public static readonly DependencyProperty PointerCapCustomGeometryProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    PointerCapRadiusProperty

    Identifies the PointerCapRadius dependency p0roperty.

    Declaration
    public static readonly DependencyProperty PointerCapRadiusProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    PointerCapTypeProperty

    Identifies the PointerCapType dependency p0roperty.

    Declaration
    public static readonly DependencyProperty PointerCapTypeProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    Properties

    CapOnTop

    Gets or sets a value indicating whether a cap locates at the top or at the

    bottom of the needle. This is a dependency property.

    Declaration
    public bool CapOnTop { get; set; }
    Property Value
    Type Description
    System.Boolean

    Type: System.Boolean Default value is true.

    PointerCapCustomGeometry

    Gets or sets a custom geometry for the Pointer Cap. This is a dependency property.

    Declaration
    public Geometry PointerCapCustomGeometry { get; set; }
    Property Value
    Type Description
    System.Windows.Media.Geometry

    Type: System.Windows.Media.Geometry Default value is null.

    PointerCapRadius

    Gets or sets the radius for the cap.

    Declaration
    public double PointerCapRadius { get; set; }
    Property Value
    Type Description
    System.Double

    Type: System.Double Default value is 0.

    PointerCapType

    Gets or sets the cap style. This is a dependency property.

    Declaration
    public PointerCapType PointerCapType { get; set; }
    Property Value
    Type Description
    PointerCapType

    Type: PointerCapType Default value is PointerCapType.Default.

    Methods

    MeasureOverride(Size)

    Measures the size in layout required for child elements and determines a size for the cap element.

    Declaration
    protected override Size MeasureOverride(Size constraint)
    Parameters
    Type Name Description
    System.Windows.Size constraint

    The available size that this element can give to child elements.

    Returns
    Type Description
    System.Windows.Size

    The size that this element determines it needs during layout.

    OnInitialized(EventArgs)

    Raises the System.Windows.FrameworkElement.Initialized event. This method is invoked whenever System.Windows.FrameworkElement.IsInitialized property is set to true internally.

    Declaration
    protected override void OnInitialized(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    The System.EventArgs that contains the event data.

    OnPointerCapCustomGeometryChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises PointerCapCustomGeometryChanged event.

    Declaration
    protected virtual void OnPointerCapCustomGeometryChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property change details, such as old value and new value.

    OnPointerCapRadiusChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises PointerCapRadiusChanged event.

    Declaration
    protected virtual void OnPointerCapRadiusChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property change details, such as old value and new value.

    OnPointerCapTypeChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises PointerCapTypeChanged event.

    Declaration
    protected virtual void OnPointerCapTypeChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property change details, such as old value and new value.

    OnRender(DrawingContext)

    Participates in rendering operations that are directed by the layout system.

    Declaration
    protected override void OnRender(DrawingContext drawingContext)
    Parameters
    Type Name Description
    System.Windows.Media.DrawingContext drawingContext

    The drawing instructions for a specific element.

    OnRenderSizeChanged(SizeChangedInfo)

    Raises the System.Windows.FrameworkElement.SizeChanged event, using the specified information as part of the eventual event data.

    Declaration
    protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
    Parameters
    Type Name Description
    System.Windows.SizeChangedInfo sizeInfo

    Details of the old and new size involved in the change.

    Events

    PointerCapCustomGeometryChanged

    Event that is raised when PointerCapCustomGeometry property is changed.

    Declaration
    public event PropertyChangedCallback PointerCapCustomGeometryChanged
    Event Type
    Type Description
    System.Windows.PropertyChangedCallback

    PointerCapRadiusChanged

    Event that is raised when PointerCapRadius property is changed.

    Declaration
    public event PropertyChangedCallback PointerCapRadiusChanged
    Event Type
    Type Description
    System.Windows.PropertyChangedCallback

    PointerCapTypeChanged

    Event that is raised when PointerCapType property is changed.

    Declaration
    public event PropertyChangedCallback PointerCapTypeChanged
    Event Type
    Type Description
    System.Windows.PropertyChangedCallback

    VisibilityChanged

    Event that is raised when System.Windows.Visibility property is changed.

    Declaration
    public event PropertyChangedCallback VisibilityChanged
    Event Type
    Type Description
    System.Windows.PropertyChangedCallback

    See Also

    Syncfusion.Windows.Gauge.PointerCapShadow
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved