【问题标题】:Lock a Grid in Show UI在显示 UI 中锁定网格
【发布时间】:2012-10-19 15:37:01
【问题描述】:

谁能帮我看看如何在powershell的showui模块中锁定网格??

我正在创建一个使用网格的应用程序

Grid -ControlName 'Show-Demo' -Columns Auto,* -Rows 9 -MinHeight 500 -MaxHeight 500 -MinWidth 500 -MaxWidth 500 {

} - 显示

当我运行它时,我能够获得一个网格视图,但大小未锁定,我仍然能够用我的鼠标调整网格的大小,我想避免这种情况并将其永久锁定为 MAX 和 MIN 高度和宽度500

【问题讨论】:

    标签: wpf powershell codeplex


    【解决方案1】:

    网格已经固定大小。尝试在网格上设置-Background Blue,然后调整大小,你就会明白我的意思了。

    你想要的是使 Window 不可调整大小。为此,您必须实际指定窗口,而不是仅在网格上使用 -Show:

    Window { 
        Grid -ControlName 'Show-Demo' -Columns Auto,* -Rows 9 {
           ...
        }
    }  -MinHeight 500 -MaxHeight 500 -MinWidth 500 -MaxWidth 500 -Show 
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多