77 lines
2.4 KiB
C#
77 lines
2.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Data;
|
|
using System.Windows.Documents;
|
|
using System.Windows.Input;
|
|
using System.Windows.Media;
|
|
using System.Windows.Media.Imaging;
|
|
using System.Windows.Navigation;
|
|
using System.Windows.Shapes;
|
|
|
|
namespace FieldVisualizer.Windows.UserControls
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for ValueLabelControl.xaml
|
|
/// </summary>
|
|
public partial class ValueLabelControl : UserControl
|
|
{
|
|
|
|
public string Value
|
|
{
|
|
get { return (string)GetValue(ValueProperty); }
|
|
set { SetValue(ValueProperty, value); }
|
|
}
|
|
|
|
// Using a DependencyProperty as the backing store for Value. This enables animation, styling, binding, etc...
|
|
public static readonly DependencyProperty ValueProperty =
|
|
DependencyProperty.Register(nameof(Value), typeof(string), typeof(ValueLabelControl), new PropertyMetadata("Label value"));
|
|
|
|
|
|
|
|
public double X
|
|
{
|
|
get { return (double)GetValue(XProperty); }
|
|
set { SetValue(XProperty, value); }
|
|
}
|
|
|
|
// Using a DependencyProperty as the backing store for X. This enables animation, styling, binding, etc...
|
|
public static readonly DependencyProperty XProperty =
|
|
DependencyProperty.Register(nameof(X), typeof(double), typeof(ValueLabelControl), new PropertyMetadata(0.0));
|
|
|
|
|
|
|
|
public double Y
|
|
{
|
|
get { return (double)GetValue(YProperty); }
|
|
set { SetValue(YProperty, value); }
|
|
}
|
|
|
|
// Using a DependencyProperty as the backing store for Y. This enables animation, styling, binding, etc...
|
|
public static readonly DependencyProperty YProperty =
|
|
DependencyProperty.Register(nameof(Y), typeof(double), typeof(ValueLabelControl), new PropertyMetadata(0.0));
|
|
|
|
|
|
|
|
public double Scale
|
|
{
|
|
get { return (double)GetValue(ScaleProperty); }
|
|
set { SetValue(ScaleProperty, value); }
|
|
}
|
|
|
|
// Using a DependencyProperty as the backing store for Scale. This enables animation, styling, binding, etc...
|
|
public static readonly DependencyProperty ScaleProperty =
|
|
DependencyProperty.Register(nameof(Scale), typeof(double), typeof(ValueLabelControl), new PropertyMetadata(0.0));
|
|
|
|
|
|
|
|
|
|
public ValueLabelControl()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
}
|
|
}
|