0

如何判断两个刷子是否相等

tColor1 = New BrushConverter().ConvertFrom("#FF89DE93")
tColor2 = New BrushConverter().ConvertFrom("#FF89DE93")
tColor3 = Brushes.LightGray

我如何比较这些 burshes 并在 tColor1 = tColor2 和 tColor1 = tColor3 的情况下为真?

4

1 回答 1

1
    Dim tColor1 As SolidColorBrush = CType(New BrushConverter().ConvertFrom("#FF89DE93"), SolidColorBrush)
    Dim tColor2 As SolidColorBrush = CType(New BrushConverter().ConvertFrom("#FF89DE93"), SolidColorBrush)
    Dim tColor3 = Brushes.LightGray

    Dim test As Boolean


    test = tColor1.Color = tColor2.Color 'True
    test = tColor1.Color = tColor3.Color 'False
于 2013-11-12T22:58:02.680 回答