当前位置: 首页>>代码示例>>C#>>正文


C# Panel.ToCell方法代码示例

本文整理汇总了C#中System.Web.UI.WebControls.Panel.ToCell方法的典型用法代码示例。如果您正苦于以下问题:C# Panel.ToCell方法的具体用法?C# Panel.ToCell怎么用?C# Panel.ToCell使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Web.UI.WebControls.Panel的用法示例。


在下文中一共展示了Panel.ToCell方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: buildTree

        private DynamicTable buildTree( string name, IEnumerable<MergeRow> emptyRowTree )
        {
            var singleRow = emptyRowTree.Single();

            var table = new DynamicTable( new EwfTableColumn( "Field name" ), new EwfTableColumn( "Description" ) ) { Caption = name };
            foreach( var field in singleRow.Values )
                table.AddTextRow( getFieldNameCellText( field ), field.GetDescription() );

            foreach( var child in singleRow.Children ) {
                var panel = new Panel();
                panel.Style.Add( HtmlTextWriterStyle.MarginLeft, "2em" );
                panel.Controls.Add( buildTree( child.NodeName, child.Rows ) );

                table.AddRow( panel.ToCell( new TableCellSetup( fieldSpan: 2 ) ) );
            }

            return table;
        }
开发者ID:william-gross,项目名称:enterprise-web-library,代码行数:18,代码来源:MergeFieldTree.cs

示例2: buildNavigationBox

        private void buildNavigationBox()
        {
            var jumpList =
                SelectList.CreateDropDown(
                    from i in Enumerable.Range( -3, 7 ) select SelectListItem.Create( i, formatDateTimeForJumpList( adjustDateByNumberOfIntervals( date, i ) ) ),
                    0,
                    autoPostBack: true );
            jumpList.Width = JumpListWidth;
            var numIntervals = 0;
            EwfPage.Instance.DataUpdate.AddTopValidationMethod( ( pbv, validator ) => numIntervals = jumpList.ValidateAndGetSelectedItemIdInPostBack( pbv, validator ) );
            EwfPage.Instance.DataUpdate.AddModificationMethod( () => dateModificationMethod( adjustDateByNumberOfIntervals( date, numIntervals ) ) );

            var previousLink =
                new PostBackButton(
                    PostBack.CreateFull( id: "prev", firstModificationMethod: () => dateModificationMethod( adjustDateByNumberOfIntervals( date, -1 ) ) ),
                    PreviousButton,
                    usesSubmitBehavior: false );
            var todayLink = new PostBackButton(
                PostBack.CreateFull( id: "today", firstModificationMethod: () => dateModificationMethod( DateTime.Today ) ),
                CurrentDateButton,
                usesSubmitBehavior: false );
            var nextLink =
                new PostBackButton(
                    PostBack.CreateFull( id: "next", firstModificationMethod: () => dateModificationMethod( adjustDateByNumberOfIntervals( date, 1 ) ) ),
                    NextButton,
                    usesSubmitBehavior: false );

            var table = new DynamicTable { CssClass = "calendarViewHeader ewfNavigationBoxHeader", IsStandard = false };
            var navControls = new Panel();
            foreach( var postBackButton in new List<PostBackButton> { previousLink, todayLink, nextLink } )
                navControls.Controls.Add( postBackButton );

            table.AddRow( jumpList, navControls.ToCell( new TableCellSetup( classes: "calendarViewNavButtons".ToSingleElementArray() ) ) );
            Controls.Add( table );
        }
开发者ID:william-gross,项目名称:enterprise-web-library,代码行数:35,代码来源:MonthViewCalendar.cs


注:本文中的System.Web.UI.WebControls.Panel.ToCell方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。