如何判断两把画笔是否相等
tColor1 = New BrushConverter().ConvertFrom("#FF89DE93")
tColor2 = New BrushConverter().ConvertFrom("#FF89DE93")
tColor3 = Brushes.LightGray
如何比较这些突发并在tColor1 = tColor2时得到真实,为tColor1 = tColor3得到假?
答案 0 :(得分: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