Initial Commit

This commit is contained in:
2024-02-23 00:46:06 -05:00
commit 2bbedc0178
470 changed files with 46035 additions and 0 deletions

View File

@@ -0,0 +1,62 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;
using System.Windows;
namespace Microsoft.Research.DynamicDataDisplay.Charts
{
/// <summary>
/// Represents simple line bound to viewport coordinates.
/// </summary>
public abstract class SimpleLine : ViewportShape
{
/// <summary>
/// Initializes a new instance of the <see cref="SimpleLine"/> class.
/// </summary>
protected SimpleLine() { }
/// <summary>
/// Gets or sets the value of line - e.g., its horizontal or vertical coordinate.
/// </summary>
/// <value>The value.</value>
public double Value
{
get { return (double)GetValue(ValueProperty); }
set { SetValue(ValueProperty, value); }
}
/// <summary>
/// Identifies Value dependency property.
/// </summary>
public static readonly DependencyProperty ValueProperty =
DependencyProperty.Register(
"Value",
typeof(double),
typeof(SimpleLine),
new PropertyMetadata(
0.0, OnValueChanged));
private static void OnValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
SimpleLine line = (SimpleLine)d;
line.OnValueChanged();
}
protected virtual void OnValueChanged()
{
UpdateUIRepresentation();
}
private LineGeometry lineGeometry = new LineGeometry();
protected LineGeometry LineGeometry
{
get { return lineGeometry; }
}
protected override Geometry DefiningGeometry
{
get { return lineGeometry; }
}
}
}