packages/MaterialDesignThemes.2.5.1/src/net45/RatingBarButton.cs

(完整代码) 1KB

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); }
        }        
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。