|
|
@@ -89,12 +89,14 @@ namespace BeDesignerSCADA.Controls |
|
|
|
/// <param name="canvas"></param> |
|
|
|
public void RunMenu(MenuModel canvas) |
|
|
|
{ |
|
|
|
int k = 0; |
|
|
|
ItemsPanelTemplate itemsPanelTemplate = new ItemsPanelTemplate(); |
|
|
|
FrameworkElementFactory _StackPanel = new FrameworkElementFactory(typeof(StackPanel)); |
|
|
|
switch (canvas.Alignment) |
|
|
|
{ |
|
|
|
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.VerticalAlignment = VerticalAlignment.Top; |
|
|
|