次の図のようにする必要があります。
処分 http://img560.imageshack.us/img560/8721/dispo16042013134903.png
水平方向にスクロールする場合は person(1) を固定する必要があり、垂直方向にスクロールする場合は date(2) を固定する必要があります。したがって、この $Person は $Date で ...(4) を行うと常に言えます。また、その人が何かを行う日ごとに追加情報を表示する必要があります(3)。
私のデータ構造が現在どのようになっているのか: Person -> Dictionary of Days -> この日に行われたことの ObservableCollection (複数の可能性があります)
これをWPFの良い方法で行うにはどうすればよいですか? できれば、DataContext を Person のコレクションに設定することしかできず、それ以外はすべて WPF によって行われます。
私はあなたの助けに感謝します。
編集:
Public Class DispoPersonViewModel
Inherits ViewModelBase
Implements iScheduleOrganizer
Private _dbContext As infosoftEntities
Private WithEvents _Person As Person
Private _DictAZGSchedule As New Concurrent.ConcurrentDictionary(Of Date, DispoAZGScheduleViewModel)
Public Sub New(ByVal Person As Person, Optional ByVal dbContext As IDBContext
'Getting the data for the person
End Sub
Public ReadOnly Property AZGSchedule(ByVal dat As Date) As BusinessObjects.AZG.AZGSchedule Implements iScheduleOrganizer.AZGSchedule
Get
Return Me._Person.AZGSchedule(dat)
End Get
End Property
'I omit the whole load and initialize and check functions here
End Class
と
Public Class DispoAZGScheduleViewModel
Inherits ViewModelBase
Private _Person As DispoPersonViewModel
Private WithEvents _AZGSchedule As AZG.AZGSchedule
Private WithEvents _lSchedule As ObservableCollection(Of DispoScheduleViewModel)
Public Sub New(AZGEinteilung As AZG.AZGSchedule, Person As DispoPersonViewModel)
'initializing the AZGSchedule
Using CSTeile.MyStack.Push("DispoAZGScheduleViewModel.New")
_AZGEinteilung = AZGEinteilung
_Person = Person
Dim lSched As New ObservableCollection(Of DispoScheduleViewModel)
For Each sc As Schedule In _AZGSchedule.ListAllSchedules.ToList
lSched.Add(New DispoScheduleViewModel(et, _Person, Me))
Next
_lSchedule = lSched
End Using
End Sub
Public ReadOnly Property ListAllSchedules As List(Of DispoScheduleViewModel)
Get
Using CSTeile.MyStack.Push("DispoAZGScheduleViewModel.ListAllEinteilung")
Return _lEinteilung.ToList
End Using
End Get
End Property
Public ReadOnly Property fc As AZG.AGZErrorCache 'for displaying errors
Get
Using CSTeile.MyStack.Push("DispoAZGScheduleViewModel.fc")
Return Me._AZGSchedule.fc.Result
End Using
End Get
End Property
'I omit here the whole hookup to my BussinessObjects it would get to much
End Class
現在、コードビハインドですべてを「ビルド」していますが、必要なすべてのことを実行できず、レンダリングが遅くなります:-(。