Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio 在lightswitch beta中更改控件的大小_Visual Studio_Visual Studio Lightswitch - Fatal编程技术网

Visual studio 在lightswitch beta中更改控件的大小

Visual studio 在lightswitch beta中更改控件的大小,visual-studio,visual-studio-lightswitch,Visual Studio,Visual Studio Lightswitch,我正在使用我的第一个应用程序,并试图更改列表控件的大小。有人知道怎么做吗?我试过: this.FindControl("PersonList").SetProperty("Height", 200); 但是被告知height属性不存在。我已经在对象浏览器中快速查看了lightswitch名称空间,但到目前为止还没有发现任何有用的东西。该代码看起来应该可以工作(只需将200更改为200.0-高度是两倍)。我刚刚在我的机器上验证了几乎相同的代码 以下是一些您可以尝试的东西: 确保为该控件使用了正确

我正在使用我的第一个应用程序,并试图更改列表控件的大小。有人知道怎么做吗?我试过:

this.FindControl("PersonList").SetProperty("Height", 200);

但是被告知height属性不存在。我已经在对象浏览器中快速查看了lightswitch名称空间,但到目前为止还没有发现任何有用的东西。

该代码看起来应该可以工作(只需将200更改为200.0-高度是两倍)。我刚刚在我的机器上验证了几乎相同的代码

以下是一些您可以尝试的东西:

  • 确保为该控件使用了正确的名称-在Visual studio中选择该控件,然后在“属性”窗口中选中该名称。Lightswitch创建了许多名称变体,例如,很容易忽略实际名称是“PersonList2”

  • 确保在控件的属性窗口中为高度控件选择了“像素”

  • 一旦您可以访问Height属性,它实际上不会做任何事情,直到您将控件对齐设置为“Top”。如果它保持“拉伸”,它将忽略写入Height属性的任何内容

    让我知道,如果你仍然有困难,让这个工作