-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml.vb
54 lines (41 loc) · 2.36 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Imports System.Collections.Generic
Imports System.Windows
Namespace RichInGridColumnWpf
Public Partial Class MainWindow
Inherits Window
Public Sub New()
Me.InitializeComponent()
Dim invoices As List(Of Invoice) = New List(Of Invoice) From {New Invoice With {.Id = 1, .Price = 10D, .Description = "{\rtf1\deff0{\fonttbl{\f0 Times New Roman;}{\f1 Consolas;}}{\colortbl\red0\green0\blue0 ;\red0\green0\blue255 ;\red163\green21\blue21 ;}{\*\listoverridetable}{\stylesheet {\ql\cf0 Normal;}{\*\cs1\cf0 Default Paragraph Font;}{\*\cs2\sbasedon1\cf0 Line Number;}{\*\cs3\ul\cf1 Hyperlink;}}\sectd\pard\plain\ql{\f1\fs18\cf2 Invoice1}\par}"}, New Invoice With {.Id = 2, .Price = 15D, .Description = "{\rtf1\deff0{\fonttbl{\f0 Times New Roman;}{\f1 Consolas;}}{\colortbl\red0\green0\blue0 ;\red0\green0\blue255 ;\red163\green21\blue21 ;}{\*\listoverridetable}{\stylesheet {\ql\cf0 Normal;}{\*\cs1\cf0 Default Paragraph Font;}{\*\cs2\sbasedon1\cf0 Line Number;}{\*\cs3\ul\cf1 Hyperlink;}}\sectd\pard\plain\ql{\f1\fs18\cf2 Invoice2}\par}"}, New Invoice With {.Id = 3, .Price = 20D, .Description = "{\rtf1\deff0{\fonttbl{\f0 Times New Roman;}{\f1 Consolas;}}{\colortbl\red0\green0\blue0 ;\red0\green0\blue255 ;\red163\green21\blue21 ;}{\*\listoverridetable}{\stylesheet {\ql\cf0 Normal;}{\*\cs1\cf0 Default Paragraph Font;}{\*\cs2\sbasedon1\cf0 Line Number;}{\*\cs3\ul\cf1 Hyperlink;}}\sectd\pard\plain\ql{\f1\fs18\cf2 Invoice3}\par}"}}
Me.gridControl1.ItemsSource = invoices
End Sub
End Class
Public Class Invoice
Private idField As Integer
Public Property Id As Integer
Get
Return idField
End Get
Set(ByVal value As Integer)
idField = value
End Set
End Property
Private priceField As Decimal
Public Property Price As Decimal
Get
Return priceField
End Get
Set(ByVal value As Decimal)
priceField = value
End Set
End Property
Private descriptionField As String
Public Property Description As String
Get
Return descriptionField
End Get
Set(ByVal value As String)
descriptionField = value
End Set
End Property
End Class
End Namespace