Check alle échte Black Friday-deals Ook zo moe van nepaanbiedingen? Wij laten alleen échte deals zien

[XAML] If textbox.FontWeight = FontWeights.Bold Then error

Pagina: 1
Acties:

  • Swerfer
  • Registratie: Mei 2003
  • Laatst online: 19-11 21:48
Ik heb een probleem met waarschijnlijk een sinpel antwoord, maar ik kan niks vinden op internet:
Visual Basic .NET:
1
2
3
If textbox.FontWeight = FontWeights.Bold Then

If textbox.FontWeight Is FontWeights.Bold Then

Beide geven een foutmelding. Hoe kan ik controleren of een font op een textbox bold is?

Foutmelding 1:

Operator '=' is not defined for types 'Windows.UI.Text.FontWeight' and 'Windows.UI.Text.FontWeight'.

Foutmelding 2:

'Is' operator does not accept operands of type 'Windows.UI.Text.FontWeight'. Operands must be reference or nullable types.

Edit:

Laat maar:

Visual Basic .NET:
1
_Ingredient.FontWeight.Weight = FontWeights.Bold.Weight

[ Voor 8% gewijzigd door Swerfer op 02-07-2013 20:26 ]

Home Assistant | Unifi | LG 51MR.U44 | Volvo EX30 SMER+ Vapour Grey, trekhaak | SmartEVSE V3 | Cronos Crypto.com