// Token: 0x06004D47 RID: 19783 RVA: 0x0015BD78 File Offset: 0x00159F78 private static void PropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { GridViewColumnHeader gridViewColumnHeader = (GridViewColumnHeader)d; if (!gridViewColumnHeader.IsInternalGenerated) { GridViewColumnHeader.Flags flag; GridViewColumnHeader.Flags flag2; GridViewColumnHeader.PropertyToFlags(e.Property, out flag, out flag2); if (!gridViewColumnHeader.GetFlag(flag2)) { if (e.NewValueSource == BaseValueSourceInternal.Local) { gridViewColumnHeader.SetFlag(flag, true); return; } gridViewColumnHeader.SetFlag(flag, false); GridViewHeaderRowPresenter gridViewHeaderRowPresenter = gridViewColumnHeader.Parent as GridViewHeaderRowPresenter; if (gridViewHeaderRowPresenter != null) { gridViewHeaderRowPresenter.UpdateHeaderProperty(gridViewColumnHeader, e.Property); } } } }
//------------------------------------------------------------------- // // Private Methods // //------------------------------------------------------------------- #region Private Methods private static void PropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { GridViewColumnHeader header = (GridViewColumnHeader)d; if (!header.IsInternalGenerated) { Flags flag, ignoreFlag; PropertyToFlags(e.Property, out flag, out ignoreFlag); if (!header.GetFlag(ignoreFlag)) // value is updated by user { if (e.NewValueSource == BaseValueSourceInternal.Local) { header.SetFlag(flag, true); } else { header.SetFlag(flag, false); GridViewHeaderRowPresenter headerRowPresenter = header.Parent as GridViewHeaderRowPresenter; if (headerRowPresenter != null) { headerRowPresenter.UpdateHeaderProperty(header, e.Property); } } } } }
//Because ColumnHeader isn't focusable, we must forward focus to ListView when user invoke the header by access key private void MakeParentGotFocus() { GridViewHeaderRowPresenter headerRP = this.Parent as GridViewHeaderRowPresenter; if (headerRP != null) { headerRP.MakeParentItemsControlGotFocus(); } }
// Token: 0x06004D4B RID: 19787 RVA: 0x0015BEBC File Offset: 0x0015A0BC private void MakeParentGotFocus() { GridViewHeaderRowPresenter gridViewHeaderRowPresenter = base.Parent as GridViewHeaderRowPresenter; if (gridViewHeaderRowPresenter != null) { gridViewHeaderRowPresenter.MakeParentItemsControlGotFocus(); } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 3: this.LeftHeader = ((System.Windows.Controls.GridViewHeaderRowPresenter)(target)); return; case 4: this.LeftAlignmentView = ((System.Windows.Controls.ListBox)(target)); return; case 5: this.hsbLeft = ((System.Windows.Controls.Primitives.ScrollBar)(target)); #line 452 "..\..\..\Views\AlignmentEditor.xaml" this.hsbLeft.Scroll += new System.Windows.Controls.Primitives.ScrollEventHandler(this.OnHorizontalScroll); #line default #line hidden return; case 6: this.RightHeader = ((System.Windows.Controls.GridViewHeaderRowPresenter)(target)); return; case 7: this.RightAlignmentView = ((System.Windows.Controls.ListBox)(target)); return; case 8: this.hsbRight = ((System.Windows.Controls.Primitives.ScrollBar)(target)); #line 484 "..\..\..\Views\AlignmentEditor.xaml" this.hsbRight.Scroll += new System.Windows.Controls.Primitives.ScrollEventHandler(this.OnHorizontalScroll); #line default #line hidden return; } this._contentLoaded = true; }
public override void OnApplyTemplate() { base.OnApplyTemplate(); if (_headerRowPresenter != null) _headerRowPresenter.Loaded -= OnHeaderRowPresenterLoaded; _headerRowPresenter = (GridViewHeaderRowPresenter)Template.FindName(HeaderRowPresenterTemplateName, this); if (_headerRowPresenter != null) _headerRowPresenter.Loaded += OnHeaderRowPresenterLoaded; if (_scrollViewerBody != null) _scrollViewerBody.ScrollChanged -= OnScrollViewerBodyScrollChanged; _scrollViewerBody = (ScrollViewer)Template.FindName(BodyScrollViewTemplateName, this); if (_scrollViewerBody != null) _scrollViewerBody.ScrollChanged += OnScrollViewerBodyScrollChanged; _scrollViewerHeader = (ScrollViewer)Template.FindName(HeaderScrollViewTemplateName, this); }
// Find ItemsControl through TemplatedParent private static ItemsControl FindItemsControlThroughTemplatedParent(GridViewHeaderRowPresenter presenter) { FrameworkElement fe = presenter.TemplatedParent as FrameworkElement; ItemsControl itemsControl = null; while (fe != null) { itemsControl = fe as ItemsControl; if (itemsControl != null) { break; } fe = fe.TemplatedParent as FrameworkElement; } return itemsControl; }
/// public GridViewHeaderRowPresenterAutomationPeer(GridViewHeaderRowPresenter owner) : base(owner) { }