本文整理汇总了C#中DevExpress.XtraBars.Bar.ApplyDockRowCol方法的典型用法代码示例。如果您正苦于以下问题:C# DevExpress.XtraBars.Bar.ApplyDockRowCol方法的具体用法?C# DevExpress.XtraBars.Bar.ApplyDockRowCol怎么用?C# DevExpress.XtraBars.Bar.ApplyDockRowCol使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DevExpress.XtraBars.Bar
的用法示例。
在下文中一共展示了DevExpress.XtraBars.Bar.ApplyDockRowCol方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateNewPanel
/// <summary>
/// Создаем дополнительную панель
/// </summary>
private void CreateNewPanel()
{
EventHandler<ViewShownEventArgs> viewShownHandler = null;
var mainPanel = ((DevExpress.ExpressApp.Win.Templates.NestedFrameTemplate)((NestedFrame)Frame).ViewItem.Control).BarManager.Bars
.OfType<DevExpress.XtraBars.Bar>()
.FirstOrDefault(b => b.DockStyle == DevExpress.XtraBars.BarDockStyle.Top);
var objCreationLink = mainPanel.LinksPersistInfo.OfType<DevExpress.XtraBars.LinkPersistInfo>().FirstOrDefault(i => i.Item.Name == "cObjectsCreation");
mainPanel.LinksPersistInfo.Remove(objCreationLink);
DevExpress.XtraBars.Bar newPanel = new DevExpress.XtraBars.Bar();
newPanel.Visible = true;
newPanel.DockStyle = DevExpress.XtraBars.BarDockStyle.Top;
newPanel.OptionsBar.DrawDragBorder = false;
newPanel.LinksPersistInfo.Add(objCreationLink);
((DevExpress.ExpressApp.Win.Templates.NestedFrameTemplate)((NestedFrame)Frame).ViewItem.Control).BarManager.Bars.Add(newPanel);
newPanel.DockCol = 0;
newPanel.DockRow = 0;
newPanel.ApplyDockRowCol();
viewShownHandler += (object sender, ViewShownEventArgs e) =>
{
if (View != null && View.Id == "IExamination_CompactListView")
{
try
{
mainPanel.DockRow = 0;
mainPanel.DockCol = 2;
mainPanel.ApplyDockRowCol();
mainPanel.Offset = newPanel.Size.Width + 20;
Application.ViewShown -= viewShownHandler;
}
catch { }
}
};
Application.ViewShown += viewShownHandler;
}