123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- // --------------------------------------------------------------------------------------------------------------------
- // <copyright file="PlotBase.Properties.cs" company="OxyPlot">
- // Copyright (c) 2014 OxyPlot contributors
- // </copyright>
- // <summary>
- // Represents a control that displays a <see cref="PlotModel" />.
- // </summary>
- // --------------------------------------------------------------------------------------------------------------------
- using Avalonia;
- using Avalonia.Input;
- using Avalonia.Markup.Xaml.Templates;
- namespace OxyPlot.Avalonia
- {
- /// <summary>
- /// Represents a control that displays a <see cref="PlotModel" />.
- /// </summary>
- public partial class PlotBase
- {
- /// <summary>
- /// Identifies the <see cref="DefaultTrackerTemplate"/> dependency property.
- /// </summary>
- public static readonly StyledProperty<ControlTemplate> DefaultTrackerTemplateProperty = AvaloniaProperty.Register<PlotBase, ControlTemplate>(nameof(DefaultTrackerTemplate));
- /// <summary>
- /// Identifies the <see cref="IsMouseWheelEnabled"/> dependency property.
- /// </summary>
- public static readonly StyledProperty<bool> IsMouseWheelEnabledProperty = AvaloniaProperty.Register<PlotBase, bool>(nameof(IsMouseWheelEnabled), true);
- /// <summary>
- /// Identifies the <see cref="PanCursor"/> dependency property.
- /// </summary>
- public static readonly StyledProperty<Cursor> PanCursorProperty = AvaloniaProperty.Register<PlotBase, Cursor>(nameof(PanCursor), new Cursor(StandardCursorType.Hand));
- /// <summary>
- /// Identifies the <see cref="ZoomHorizontalCursor"/> dependency property.
- /// </summary>
- public static readonly StyledProperty<Cursor> ZoomHorizontalCursorProperty = AvaloniaProperty.Register<PlotBase, Cursor>(nameof(ZoomHorizontalCursor), new Cursor(StandardCursorType.SizeWestEast));
- /// <summary>
- /// Identifies the <see cref="ZoomRectangleCursor"/> dependency property.
- /// </summary>
- public static readonly StyledProperty<Cursor> ZoomRectangleCursorProperty = AvaloniaProperty.Register<PlotBase, Cursor>(nameof(ZoomRectangleCursor), new Cursor(StandardCursorType.SizeAll));
- /// <summary>
- /// Identifies the <see cref="ZoomRectangleTemplate"/> dependency property.
- /// </summary>
- public static readonly StyledProperty<ControlTemplate> ZoomRectangleTemplateProperty = AvaloniaProperty.Register<PlotBase, ControlTemplate>(nameof(ZoomRectangleTemplate));
- /// <summary>
- /// Identifies the <see cref="ZoomVerticalCursor"/> dependency property.
- /// </summary>
- public static readonly StyledProperty<Cursor> ZoomVerticalCursorProperty = AvaloniaProperty.Register<PlotBase, Cursor>(nameof(ZoomVerticalCursor), new Cursor(StandardCursorType.SizeNorthSouth));
- static PlotBase()
- {
- }
- /// <summary>
- /// Gets or sets the default tracker template.
- /// </summary>
- public ControlTemplate DefaultTrackerTemplate
- {
- get
- {
- return GetValue(DefaultTrackerTemplateProperty);
- }
- set
- {
- SetValue(DefaultTrackerTemplateProperty, value);
- }
- }
- /// <summary>
- /// Gets or sets a value indicating whether IsMouseWheelEnabled.
- /// </summary>
- public bool IsMouseWheelEnabled
- {
- get
- {
- return GetValue(IsMouseWheelEnabledProperty);
- }
- set
- {
- SetValue(IsMouseWheelEnabledProperty, value);
- }
- }
- /// <summary>
- /// Gets or sets the pan cursor.
- /// </summary>
- /// <value>The pan cursor.</value>
- public Cursor PanCursor
- {
- get
- {
- return GetValue(PanCursorProperty);
- }
- set
- {
- SetValue(PanCursorProperty, value);
- }
- }
- /// <summary>
- /// Gets or sets the horizontal zoom cursor.
- /// </summary>
- /// <value>The zoom horizontal cursor.</value>
- public Cursor ZoomHorizontalCursor
- {
- get
- {
- return GetValue(ZoomHorizontalCursorProperty);
- }
- set
- {
- SetValue(ZoomHorizontalCursorProperty, value);
- }
- }
- /// <summary>
- /// Gets or sets the rectangle zoom cursor.
- /// </summary>
- /// <value>The zoom rectangle cursor.</value>
- public Cursor ZoomRectangleCursor
- {
- get
- {
- return GetValue(ZoomRectangleCursorProperty);
- }
- set
- {
- SetValue(ZoomRectangleCursorProperty, value);
- }
- }
- /// <summary>
- /// Gets or sets the zoom rectangle template.
- /// </summary>
- /// <value>The zoom rectangle template.</value>
- public ControlTemplate ZoomRectangleTemplate
- {
- get
- {
- return GetValue(ZoomRectangleTemplateProperty);
- }
- set
- {
- SetValue(ZoomRectangleTemplateProperty, value);
- }
- }
- /// <summary>
- /// Gets or sets the vertical zoom cursor.
- /// </summary>
- /// <value>The zoom vertical cursor.</value>
- public Cursor ZoomVerticalCursor
- {
- get
- {
- return GetValue(ZoomVerticalCursorProperty);
- }
- set
- {
- SetValue(ZoomVerticalCursorProperty, value);
- }
- }
- }
- }
|