/
MainWindow.xaml.vb
52 lines (43 loc) · 1.45 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
Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Data
Imports System.Windows.Documents
Imports System.Windows.Input
Imports System.Windows.Media
Imports System.Windows.Media.Imaging
Imports System.Windows.Navigation
Imports System.Windows.Shapes
Namespace PivotGauges
''' <summary>
''' Interaction logic for MainWindow.xaml
''' </summary>
Partial Public Class MainWindow
Inherits Window
Private ReadOnly mainViewModel As New AnalyticsDataViewModel()
Public Sub New()
InitializeComponent()
Me.DataContext = mainViewModel
End Sub
Private Sub Window_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
pivot.FocusedCell = New System.Drawing.Point(0, 0)
SelectColumn(0, 0)
End Sub
Private Sub pivot_CellClick(ByVal sender As Object, ByVal e As DevExpress.Xpf.PivotGrid.PivotCellEventArgs)
SelectColumn(e.ColumnIndex, e.RowIndex)
End Sub
Private Sub SelectColumn(ByVal columnIndex As Integer, ByVal rowIndex As Integer)
pivot.FocusedCell = New System.Drawing.Point(columnIndex, rowIndex)
Dim points(pivot.RowCount - 1) As System.Drawing.Point
For i As Integer = 0 To pivot.RowCount - 1
points(i) = New System.Drawing.Point(pivot.FocusedCell.X, i)
Next i
pivot.MultiSelection.SetSelection(points)
mainViewModel.UpdateData(pivot)
End Sub
End Class
End Namespace