【发布时间】:2013-10-21 10:12:12
【问题描述】:
我为 UserControl 创建了一个 DependencyProperty,它应该在 -2 .. 2 的范围内
在属性窗口中旋转鼠标滚轮时。 属性值变化 1。我想改变 0.1 的值 如何在 DependencyProperty 中设置阶跃变化? 我在 XAML 编辑器中使用属性。
public double Value
{
get { return (double)GetValue(BarValueProperty); }
set { SetValue(BarValueProperty, value); }
}
public static readonly DependencyProperty BarValueProperty =
DependencyProperty.Register("Value", typeof(double), typeof(MeterBar), new FrameworkPropertyMetadata(0.0, FrameworkPropertyMetadataOptions.AffectsRender));
【问题讨论】:
标签: wpf xaml dependency-properties