コード例 #1
0
ファイル: RadPageViewPage.cs プロジェクト: RichardHaggard/BDC
        private bool ShouldSerializePageLength()
        {
            if (this.owner == null)
            {
                return(false);
            }
            RadPageViewExplorerBarElement viewElement = this.owner.ViewElement as RadPageViewExplorerBarElement;

            return(viewElement != null && this.item != null && (viewElement.ContentSizeMode == ExplorerBarContentSizeMode.FixedLength && this.item.PageLength != 300));
        }
コード例 #2
0
        protected virtual RadPageViewItem CreatePageViewItem(
            IRadPageViewProvider pageViewProvider,
            GridViewInfo viewInfo)
        {
            RadPageViewItem pageViewItem = pageViewProvider.CreatePageViewItem((object)this);
            string          str          = "table";

            if (!string.IsNullOrEmpty(viewInfo.ViewTemplate.DataMember))
            {
                str = viewInfo.ViewTemplate.DataMember;
            }
            if (!string.IsNullOrEmpty(viewInfo.ViewTemplate.Caption))
            {
                str = viewInfo.ViewTemplate.Caption;
            }
            pageViewItem.Tag  = (object)viewInfo;
            pageViewItem.Text = str;
            pageViewItem.RadPropertyChanging += new RadPropertyChangingEventHandler(this.item_RadPropertyChanging);
            pageViewItem.RadPropertyChanged  += new RadPropertyChangedEventHandler(this.item_RadPropertyChanged);
            RadPageViewExplorerBarItem viewExplorerBarItem = pageViewItem as RadPageViewExplorerBarItem;

            if (viewExplorerBarItem != null)
            {
                GridTableElement viewUiElement = (GridTableElement)viewInfo.ViewTemplate.ViewDefinition.CreateViewUIElement(viewInfo);
                viewUiElement.ViewElement.StretchVertically = false;
                viewUiElement.StretchVertically             = false;
                viewExplorerBarItem.IsExpanded = true;
                viewExplorerBarItem.AssociatedContentAreaElement = new RadPageViewContentAreaElement();
                RadPageViewExplorerBarElement pageViewElement = (RadPageViewExplorerBarElement)this.pageViewElement;
                if (pageViewElement != null && pageViewElement.StackPosition == StackViewPosition.Left)
                {
                    viewUiElement.StretchHorizontally = false;
                    viewExplorerBarItem.AssociatedContentAreaElement.StretchHorizontally = false;
                }
                else
                {
                    viewUiElement.StretchHorizontally = true;
                    viewExplorerBarItem.AssociatedContentAreaElement.StretchHorizontally = true;
                }
                this.pageViewElement.Children.Add((RadElement)viewExplorerBarItem.AssociatedContentAreaElement);
                viewExplorerBarItem.AssociatedContentAreaElement.Children.Add((RadElement)viewUiElement);
                if (this.rowView == null)
                {
                    this.rowView = viewUiElement;
                }
                viewUiElement.Initialize(this.GridViewElement, viewInfo);
                IGridRowLayout rowLayout = ((TableViewDefinition)viewInfo.ViewTemplate.ViewDefinition).CreateRowLayout();
                rowLayout.Initialize(viewUiElement);
                viewUiElement.ViewElement.RowLayout = rowLayout;
            }
            return(pageViewItem);
        }
コード例 #3
0
        protected virtual RadPageViewElement CreatePageViewElement(
            IRadPageViewProvider pageViewProvider)
        {
            RadPageViewElement pageViewElement = pageViewProvider.CreatePageViewElement((object)this);

            pageViewElement.StretchVertically             = false;
            pageViewElement.ContentArea.StretchVertically = false;
            RadPageViewExplorerBarElement explorerBarElement = pageViewElement as RadPageViewExplorerBarElement;

            if (explorerBarElement != null)
            {
                explorerBarElement.ExpandedChanged += new EventHandler <RadPageViewExpandedChangedEventArgs>(this.explorerBarElement_ExpandedChanged);
            }
            pageViewElement.UpdateSelectedItemContent = false;
            return(pageViewElement);
        }
コード例 #4
0
ファイル: RadPageViewPage.cs プロジェクト: configare/hispeed
        private bool ShouldSerializePageLength()
        {
            if (this.owner == null)
            {
                return(false);
            }

            RadPageViewExplorerBarElement element = this.owner.ViewElement as RadPageViewExplorerBarElement;

            if (element == null || this.item == null)
            {
                return(false);
            }

            if (element.ContentSizeMode == ExplorerBarContentSizeMode.FixedLength)
            {
                if (this.item.PageLength != RadPageViewExplorerBarItem.DEFAULT_PAGE_LENGTH)
                {
                    return(true);
                }
            }

            return(false);
        }
コード例 #5
0
 public ExplorerBarLayoutInfo(RadPageViewExplorerBarElement layout, SizeF availableSize)
     : base(layout, availableSize)
 {
 }