我有一個帶有文本框的silverlight 4子窗口。當我單擊文本框中的現有文本時,點擊會向右註冊約25個像素。所有其他「點擊」(用於按鈕等)註冊鼠標的位置。點擊一個空的文本框也正確註冊。只有在文本框中有文本。Silverlight中的文本框ChildWindow單擊並選擇文本錯誤
該行爲在IE8和Chrome中都存在。我已經嘗試了一個新的,剝離下來的項目。其他人有沒有經歷過相同的行爲?
更新:這也可能是相關的,我在高分辨率顯示器上並使用非標準dpi。
我的MainPage.xaml中:
<Grid x:Name="LayoutRoot" Background="White">
<Button Content="Show" Click="Button_Click" />
</Grid>
我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>
我關於開展ChildWindow MainPage.xaml.cs中:
private void Button_Click(object sender, RoutedEventArgs e)
{
var window = new ChildWindow1();
window.Show();
}