Friday, October 12, 2012

Mouse not working in SilverLight (Grid Layout)

Mouse not working in SilverLight (Grid Layout)

I have the following silverlight code but the problem is that mouse does not work. I cannot click any controls (text boxes, button). I can only access them through tab. however if I change the layout from the grid to canvas, everything seems fine. I also tried searching for the same on the internet but couldn't find anything except that in the grid layout the background color should be set to transparent. still it does not work:

 <Grid x:Name="LayoutRoot" Background="Transparent" >         <Grid.RowDefinitions>             <RowDefinition Height="auto"/>             <RowDefinition Height="auto"/>         </Grid.RowDefinitions>           <Grid.ColumnDefinitions>             <ColumnDefinition Width="auto"/>             <ColumnDefinition Width="auto"/>         </Grid.ColumnDefinitions>          <TextBlock x:Name="myText" Text="My 1st Application" FontSize="40" FontFamily="Arial Black"    Height="127" Canvas.Left="12" Canvas.Top="17" Opacity="0.5" Width="268" FontStretch="Expanded" TextWrapping="Wrap" Foreground="#FF8D4C4C" Grid.Row="1" Grid.Column="1" />         <uc:MyHelloCtl HorizontalAlignment="Left" Margin="21,32,0,0" x:Name="myHelloCtl1" VerticalAlignment="Top" BorderThickness="1" IsTabStop="True" TabIndex="1" Canvas.Left="26" Canvas.Top="5" Opacity="0.8" Grid.Row="0" Grid.Column="0"/>     </Grid> 

Answers & Comments...




No comments:

Post a Comment

Send us your comment related to the topic mentioned on the blog