|
@@ -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; |
|
|