0

それで、wpf カレンダーを作成しようとしていますが、GetValue() および SetValue() メソッドに問題があります。すべてのライブラリを宣言しましたが、これらのメソッドがまったく存在せず、認識されないことがわかりました。

    using System;
    using System.Collections.ObjectModel;
    using System.ComponentModel;
    using System.Windows;
    using System.Windows.Controls;
    using System.Reflection;


    namespace CustomControls
    {
       public class Calendar : Control
        {
            public ObservableCollection<Day> Days { get; set; }
            public ObservableCollection<string> DayNames { get; set; }
            public static readonly DependencyProperty CurrentDateProperty = DependencyProperty.Register("CurrentDate", typeof (DateTime), typeof (Calendar));

            public event EventHandler<DayChangedEventArgs> DayChanged;

            public DateTime CurrentDate
            {
                get { return (DateTime) GetValue(CurrentDateProperty); }
                set { SetValue(CurrentDateProperty, value); }
            }
        }
}

あなたが私を助けてくれることを願っています。事前に感謝します!

4

0 に答える 0