Example #1
0
        internal override void PrepareUI()
        {
            if (this.Owner == null || !this.IsTemplateApplied)
            {
                return;
            }

            this.Container.Owner = this.Owner.Owner;

            var visibleColumns = this.Owner.Owner.Model.VisibleColumns;

            for (int i = 0; i < visibleColumns.Count(); i++)
            {
                DataGridColumn column = visibleColumns.ElementAt(i);

                DataGridFlyoutColumnHeader header = new DataGridFlyoutColumnHeader();

                this.SetupDragDropProperties(header, i);

                header.DataContext       = column;
                header.SelectionCheck   += this.Header_SelectionCheck;
                header.SelectionUncheck += this.Header_SelectionUncheck;

                header.DragSurfaceRequested += this.HandleDragSurfaceRequested;
                header.ParentGrid            = this.Owner.Owner;

                this.Container.Elements.Add(header);
            }
        }
        /// <inheritdoc/>
        protected override DataGridFlyoutHeader CreateHeader()
        {
            DataGridFlyoutColumnHeader header = new DataGridFlyoutColumnHeader();

            header.Width = this.ActualWidth;
            header.OuterBorderVisibility = Visibility.Visible;
            return(header);
        }