0

私はLabelここに XAML を持っています。XAML 側でコンテンツを設定すると、表示されます。しかし、コード ビハインドでコンテンツを設定しようとすると、次のように表示されません。

私のコード:

if (Application.Current.Resources["Values"] != null)
{
    string score = Application.Current.Resources["Values"].ToString();
    labelscore.Content = score;           
}

リソースの値を確認しました。値はありますが、表示できません。

私のXAML側:

<Label Height="30" Width="100" Name="labelscore" FontWeight="Bold" FontSize="15" />
4

1 に答える 1