0
如何檢查後臺標籤這裏我如何檢查特定屬性是否存在控件或不在WPF中?
if([Label has any color don't do anything]){
if (turn == Players.p1)
{
label.Background = Brushes.Red;
turn = Players.p2;
}
else
{
label.Background = Brushes.Green;
turn = Players.p1;
}
}
if(label.Background == null)?? –
我試過,但沒有工作......它有默認的「#00FFFFFF」,所以它總是讓我真實 –
「#00FFFFFF」是透明的,所以這應該工作'if(label.Background == Brushes.Transparent) ' –