GPT의 DependencyProperty 표현 스타일

제가 더 간단하게 생각해보자고 계속 다독이고 있었는데, 화가 났는지 DpendencyProperty 코딩 스타일까지 변화를 주는 모습입니다. :laughing:

반응이 재미있어서 올려봤습니다. (물론 이렇게 쓰시는분도 당연히 계시겠죠~)

// Dependency Properties
public static readonly DependencyProperty MaximumProperty = DependencyProperty.Register("Maximum", typeof(double), typeof(RangeSlider), new FrameworkPropertyMetadata(100.0));
public static readonly DependencyProperty MinimumProperty = DependencyProperty.Register("Minimum", typeof(double), typeof(RangeSlider), new FrameworkPropertyMetadata(0.0));
public static readonly DependencyProperty LeftValueProperty = DependencyProperty.Register("LeftValue", typeof(double), typeof(RangeSlider), new FrameworkPropertyMetadata(0.0, OnLeftValueChanged));
public static readonly DependencyProperty RightValueProperty = DependencyProperty.Register("RightValue", typeof(double), typeof(RangeSlider), new FrameworkPropertyMetadata(100.0, OnRightValueChanged));

// Properties
public double Maximum { get => (double)GetValue(MaximumProperty); set => SetValue(MaximumProperty, value); }
public double Minimum { get => (double)GetValue(MinimumProperty); set => SetValue(MinimumProperty, value); }
public double LeftValue { get => (double)GetValue(LeftValueProperty); set => SetValue(LeftValueProperty, value); }
public double RightValue { get => (double)GetValue(RightValueProperty); set => SetValue(RightValueProperty, value); }
9개의 좋아요

nameof 까지 가야죠 ㅋㅋ

3개의 좋아요