views:

324

answers:

1

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 this a known bug ?

A: 

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.

AnthonyWJones