I have a silverlight 4 childwindow that has a textbox. When I click existing text in the textbox, the click is registered about 25 pixels to the right. All other "clicks" (for buttons, etc) register where the mouse is. And a click to an empty text box also registers correctly. It is only if there is text in the textbox.
The behavior exists in both IE8 and Chrome. I've tried this with a new, stripped down project as well. Has anyone else has ever experienced the same behavior?
Update: It might also be relevant that I'm on a high res monitor and using a non standard dpi.
My MainPage.xaml:
<Grid x:Name="LayoutRoot" Background="White">
<Button Content="Show" Click="Button_Click" />
</Grid>
My ChildWindow.xaml:
<Grid x:Name="LayoutRoot" Margin="2">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBox Width="200" />
<Button x:Name="CancelButton" Content="Cancel" Click="CancelButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,0,0" Grid.Row="1" />
<Button x:Name="OKButton" Content="OK" Click="OKButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,79,0" Grid.Row="1" />
</Grid>
My MainPage.xaml.cs for launching the ChildWindow:
private void Button_Click(object sender, RoutedEventArgs e)
{
var window = new ChildWindow1();
window.Show();
}