private ListViewDetailColumn GetFirstVisibleColumn()
        {
            if (this.row == null || this.row.Data == null || this.row.Data.Owner == null)
            {
                return((ListViewDetailColumn)null);
            }
            DetailListViewElement viewElement = this.row.Data.Owner.ViewElement as DetailListViewElement;

            if (viewElement == null)
            {
                if (this.Data.Owner.Columns.Count <= 0)
                {
                    return((ListViewDetailColumn)null);
                }
                return(this.Data.Owner.Columns[0]);
            }
            foreach (ListViewDetailColumn column in (Collection <ListViewDetailColumn>)viewElement.Owner.Columns)
            {
                if (column.Visible)
                {
                    return(column);
                }
            }
            if (this.Data.Owner.Columns.Count <= 0)
            {
                return((ListViewDetailColumn)null);
            }
            return(this.Data.Owner.Columns[0]);
        }
Exemple #2
0
        protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
        {
            base.OnPropertyChanged(e);
            if (e.Property == WidthProperty && this.Owner != null)
            {
                DetailListViewElement detailsView = (this.Owner.ViewElement as DetailListViewElement);

                if (detailsView != null)
                {
                    detailsView.ColumnScroller.UpdateScrollRange();
                    detailsView.ViewElement.InvalidateMeasure();
                }
            }
        }
Exemple #3
0
        public void BestFit()
        {
            if (this.Owner == null)
            {
                return;
            }
            DetailListViewElement viewElement = this.Owner.ViewElement as DetailListViewElement;

            if (viewElement == null)
            {
                return;
            }
            viewElement.BestFitHelper.BestFitQueue.EnqueueBestFitColumn(this);
            viewElement.BestFitHelper.ProcessRequests();
        }
        private ListViewDetailColumn GetFirstVisibleColumn()
        {
            if (this.row == null || this.row.Data == null)
            {
                return(null);
            }

            DetailListViewElement viewElement = (this.row.Data.Owner.ViewElement as DetailListViewElement);

            if (viewElement == null)
            {
                return(this.Data.Owner.Columns.Count > 0 ? this.Data.Owner.Columns[0] : null);
            }

            foreach (ListViewDetailColumn column in viewElement.Owner.Columns)
            {
                if (column.Visible)
                {
                    return(column);
                }
            }

            return(this.Data.Owner.Columns.Count > 0 ? this.Data.Owner.Columns[0] : null);
        }
Exemple #5
0
        private void UpdateWidth(bool checkOldWidth)
        {
            float width = this.Width;

            if ((double)this.maxWidth > 0.0)
            {
                this.width = Math.Min(this.width, this.maxWidth);
            }
            this.width = Math.Max(this.width, this.minWidth);
            if ((double)width == (double)this.width && checkOldWidth)
            {
                return;
            }
            if (this.Owner != null)
            {
                DetailListViewElement viewElement = this.Owner.ViewElement as DetailListViewElement;
                if (viewElement != null)
                {
                    viewElement.ColumnScroller.UpdateScrollRange();
                    viewElement.ViewElement.InvalidateMeasure();
                }
            }
            this.OnNotifyPropertyChanged("Width");
        }
 public ListViewBestFitQueue(DetailListViewElement detailListView)
 {
     this.bestFitRequests = new LinkedList <ListViewBestFitQueue.ListViewBestFitRequest>();
     this.detailListView  = detailListView;
 }
 public ListViewBestFitHelper(DetailListViewElement detailListView)
 {
     this.detailListView = detailListView;
     this.bestFitQueue   = new ListViewBestFitQueue(detailListView);
 }
 public DetailListViewColumnContainer(DetailListViewElement context)
 {
     this.context = context;
 }
Exemple #9
0
 public DetailListViewDragDropService(DetailListViewElement owner)
 {
     this.owner = owner;
 }