I ran into a problem reproduced on .NET 4.0 when UIElement.UseLayoutRounding="True" and TextBoxBase.VerticalScrollBarVisibility="Auto" set together. The problem is reproduced only on the Windows Classic theme (tested on Windows 7 and XP).
When the window loads, WPF shows and then hides the vertical scroll bar in the TextBlock in an infinite loop, so that the user interface becomes unusable.
The markup is completely simple:
App.xaml :
<Application x:Class="PhysioControl.CodeStat.UI.Reviewer.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" StartupUri="MainWindowView.xaml"/>
MainWindowView.xaml :
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" UseLayoutRounding="True"> <StackPanel> <TextBox VerticalScrollBarVisibility="Auto"/> </StackPanel> </Window>
Does anyone have any ideas on ways to avoid this?
ES
source share