-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.xaml.vb
32 lines (25 loc) · 1.13 KB
/
MainWindow.xaml.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Imports System.Globalization
Imports System.Windows
Imports System.Windows.Data
Imports System.Windows.Media
Namespace CustomModelSelectedPointsCustomization
Public Partial Class MainWindow
Inherits Window
Public Sub New()
Me.InitializeComponent()
End Sub
End Class
Public Class IsSelectedToBrushConverter
Implements IValueConverter
Public Function Convert(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture As CultureInfo) As Object Implements IValueConverter.Convert
If TypeOf value Is Boolean AndAlso targetType Is GetType(Brush) Then
Dim isSelected As Boolean = CBool(value)
Return If(isSelected, Brushes.Black, Brushes.Red)
End If
Return Nothing
End Function
Public Function ConvertBack(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
Throw New System.NotImplementedException()
End Function
End Class
End Namespace