Browse Source

1

样式分支
fyf 2 years ago
parent
commit
a3afc5228d
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      BeDesignerSCADA/Controls/MenuRunCanvas.xaml.cs

+ 3
- 1
BeDesignerSCADA/Controls/MenuRunCanvas.xaml.cs View File

@@ -89,12 +89,14 @@ namespace BeDesignerSCADA.Controls
/// <param name="canvas"></param> /// <param name="canvas"></param>
public void RunMenu(MenuModel canvas) public void RunMenu(MenuModel canvas)
{ {
int k = 0;
ItemsPanelTemplate itemsPanelTemplate = new ItemsPanelTemplate(); ItemsPanelTemplate itemsPanelTemplate = new ItemsPanelTemplate();
FrameworkElementFactory _StackPanel = new FrameworkElementFactory(typeof(StackPanel)); FrameworkElementFactory _StackPanel = new FrameworkElementFactory(typeof(StackPanel));
switch (canvas.Alignment) switch (canvas.Alignment)
{ {
case MenuAlignment.左边: case MenuAlignment.左边:
int k = (canvas.Name.Length / 5 -1+ (canvas.Name.Length % 5 > 0 ? 1 : 0))*15;
if(!string.IsNullOrEmpty(canvas.Name))
k = (canvas.Name.Length / 5 -1+ (canvas.Name.Length % 5 > 0 ? 1 : 0))*15;
//左边菜单栏 //左边菜单栏
PageList.HorizontalAlignment = HorizontalAlignment.Stretch; PageList.HorizontalAlignment = HorizontalAlignment.Stretch;
PageList.VerticalAlignment = VerticalAlignment.Top; PageList.VerticalAlignment = VerticalAlignment.Top;


Loading…
Cancel
Save