Ai
1 Star 0 Fork 0

摩月流云/MaterialDesignInXamlToolkit

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
RatingBarButton.cs 1.47 KB
一键复制 编辑 原始数据 按行查看 历史
using System.Windows;
using System.Windows.Controls.Primitives;
namespace MaterialDesignThemes.Wpf
{
public class RatingBarButton : ButtonBase
{
static RatingBarButton()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(RatingBarButton), new FrameworkPropertyMetadata(typeof(RatingBarButton)));
}
private static readonly DependencyPropertyKey ValuePropertyKey =
DependencyProperty.RegisterReadOnly(
"Value", typeof (int), typeof (RatingBarButton),
new PropertyMetadata(default(int)));
public static readonly DependencyProperty ValueProperty =
ValuePropertyKey.DependencyProperty;
public int Value
{
get { return (int) GetValue(ValueProperty); }
internal set { SetValue(ValuePropertyKey, value); }
}
private static readonly DependencyPropertyKey IsWithinValuePropertyKey =
DependencyProperty.RegisterReadOnly(
"IsWithinSelectedValue", typeof (bool), typeof (RatingBarButton),
new PropertyMetadata(default(bool)));
public static readonly DependencyProperty IsWithinSelectedValueProperty =
IsWithinValuePropertyKey.DependencyProperty;
public bool IsWithinSelectedValue
{
get { return (bool) GetValue(IsWithinSelectedValueProperty); }
internal set { SetValue(IsWithinValuePropertyKey, value); }
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/Jobc/MaterialDesignInXamlToolkit.git
git@gitee.com:Jobc/MaterialDesignInXamlToolkit.git
Jobc
MaterialDesignInXamlToolkit
MaterialDesignInXamlToolkit
master

搜索帮助