/// <summary> /// Called when the Framework <see cref="M:OnApplyTemplate" /> is called. Inheritors should override this method should they have some custom template-related logic. /// This is done to ensure that the <see cref="P:IsTemplateApplied" /> property is properly initialized. /// </summary> protected override bool ApplyTemplateCore() { bool applied = base.ApplyTemplateCore(); this.scrollViewer = this.GetTemplatePartField <ScrollViewer>("PART_ScrollViewer"); applied = applied && this.scrollViewer != null; this.columnHeadersPanel = this.GetTemplatePartField <DataGridColumnHeaderPanel>("PART_ColumnHeadersHost"); applied = applied && this.columnHeadersPanel != null; this.cellsPanel = this.GetTemplatePartField <DataGridCellsPanel>("PART_CellsHost"); applied = applied && this.cellsPanel != null; this.rootPanel = this.GetTemplatePartField <DataGridRootPanel>("PART_TableRoot"); applied = applied && this.rootPanel != null; this.servicePanel = this.GetTemplatePartField <DataGridServicePanel>("PART_ServicePanel"); applied = applied && this.servicePanel != null; this.decorationsHost = this.GetTemplatePartField <Panel>("PART_DecorationsHost"); applied = applied && this.decorationsHost != null; this.FrozenDecorationsHost = this.GetTemplatePartField <Panel>("PART_FrozenDecorationsHost"); applied = applied && this.FrozenDecorationsHost != null; this.GroupHeadersHost = this.GetTemplatePartField <Panel>("PART_GroupHeadersHost"); applied = applied && this.GroupHeadersHost != null; this.frozenGroupHeadersHost = this.GetTemplatePartField <Panel>("PART_HeadersHost"); applied = applied && this.frozenGroupHeadersHost != null; this.adornerHostPanel = this.GetTemplatePartField <Panel>("PART_AdornerHost"); applied = applied && this.adornerHostPanel != null; this.scrollableAdornerHostPanel = this.GetTemplatePartField <Panel>("PART_ScrollableAdornerHost"); applied = applied && this.scrollableAdornerHostPanel != null; this.frozenColumnsHost = this.GetTemplatePartField <Panel>("PART_FrozenColumnsHost"); applied = applied && this.frozenColumnsHost != null; this.frozenColumnHeadersHost = this.GetTemplatePartField <Panel>("PART_FrozenColumnHeadersHost"); applied = applied && this.frozenColumnHeadersHost != null; this.contentFlyout = this.GetTemplatePartField <DataGridContentFlyout>("PART_GridFlyout"); applied = applied && this.contentFlyout != null; this.columnReorderServicePanel = this.GetTemplatePartField <DataGridColumnReorderServicePanel>("PART_ColumnReorderServicePanel"); applied = applied && this.columnReorderServicePanel != null; return(applied); }
/// <summary> /// Initializes a new instance of the DataGridServicePanelAutomationPeer class. /// </summary> public DataGridServicePanelAutomationPeer(DataGridServicePanel owner) : base(owner) { }