I have to create a FontWeight property in my CustomControl but it is giving me error in controlling FontWeights. How can I solve it?

Property Registering:

```
public static readonly DependencyProperty FontWeightProperty =
        DependencyProperty.Register(
            "FontWeight",
            typeof(int),
            typeof(WatermarkTextBox),
        new PropertyMetadata(0));

```

Property (We can change this property, it is my amateur job):

```
    private int _watermarkFontWeight = 0;

    public int WatermarkFontWeight
    {
        get
        {
            if (watermarkPassTextBox.FontWeight == FontWeights.Normal)
            {
                _watermarkFontWeight = 0;
            }
            else if (watermarkPassTextBox.FontWeight == FontWeights.SemiBold)
            {
                _watermarkFontWeight = 1;
            }
            else if (watermarkPassTextBox.FontWeight == FontWeights.Bold)
            {
                _watermarkFontWeight = 2;
            }
            else if (watermarkPassTextBox.FontWeight == FontWeights.ExtraBold)
            {
                _watermarkFontWeight = 3;
            }
            return _watermarkFontWeight;
        }
        set
        {
            if (value == 0)
            {
                SetProperty<int>(ref _watermarkFontWeight, value, "FontWeight");
                watermarkPassTextBox.FontWeight = FontWeights.Normal;
            }
            else if (value == 1)
            {
                SetProperty<int>(ref _watermarkFontWeight, value, "FontWeight");
                watermarkPassTextBox.FontWeight = FontWeights.SemiBold;
            }
            else if (value == 2)
            {
                SetProperty<int>(ref _watermarkFontWeight, value, "FontWeight");
                watermarkPassTextBox.FontWeight = FontWeights.Bold;
            }
            else if (value == 3)
            {
                SetProperty<int>(ref _watermarkFontWeight, value, "FontWeight");
                watermarkPassTextBox.FontWeight = FontWeights.ExtraBold;
            }
        }
    }

```

Error:

```
Operator '==' cannot be applied to operands of type 'Windows.UI.Text.FontWeight' and 'Windows.UI.Text.FontWeight'

```

Thanks.