开发者

Silverlight 3 - FindName returns null

This looks a bug to me.. Using Silverlight 3 and i have a user control defined in XAML and trying to access the object during runtime returns a null.

<Grid>
  <common:CommonGridEditPanel x:Name="scannerParameters" Grid.Row="0" DataContext="{Binding Parameters}">
  <common:CommonGridEditPanel.Columns>
</Grid>

scannerParameter variable is assigned with null value, on further digging i noticed the below code in auto-generated section of the file.

this.scannerParameters = ((CommonGridEditPanel)(this.FindName("scannerParameters")));

Is t开发者_开发技巧his a known bug ?


There is no "Known bug" in this area. Like itowlson asks, it would help you showed us what you are actually doing. Most likely what you are actually doing is where the bug is.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜