哪里生成了View
public SchedulerControl(){
Initialize(null);
}
----------innercontrol
protectedinternalvirtualvoid Initialize(SchedulerStorage storage) {
this.innerControl =CreateInnerControl();
this.innerControl.Initialize();
----------innercontrol
publicvirtualvoid Initialize() {
this.views =owner.CreateViewRepository();
----------SchedulerControl
SchedulerViewRepositoryBaseIInnerSchedulerControlOwner.CreateViewRepository(){
returnnewSchedulerViewRepository();
}
----------SchedulerControl
publicvirtualvoid Initialize() {
this.views.CreateViews(this);
public class SchedulerViewRepository : SchedulerViewTypedRepositoryBase<SchedulerViewBase> { protected internal override void CreateViews(InnerSchedulerControl control) { SchedulerControl winControl = (SchedulerControl)control.Owner; RegisterView(new DayView(winControl)); RegisterView(new WorkWeekView(winControl)); RegisterView(new WeekView(winControl)); RegisterView(new MonthView(winControl)); RegisterView(new TimelineView(winControl)); RegisterView(new GanttView(winControl)); } }
devExpress制作得相当不友好。
从这里我们看得相当清楚。
可以说,设计得比较糟。
所有的元素,都是内含的。不是外显的。
包括这个注册view的过程,太死了。
我们不论从哪个方向,去切入,想要创建一个自己的视图,都困难重重。