分析devexpress sheduler 绘制过程(4)--如何生成view

哪里生成了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);


分析devexpress sheduler 绘制过程(4)--如何生成view_第1张图片


	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的过程,太死了。

我们不论从哪个方向,去切入,想要创建一个自己的视图,都困难重重。





你可能感兴趣的:(DevExpress)