11,578 questions
How to fix a flickering issue caused by the graphs adjusting their width when the scrollbar appears while resizing the application width?
Laxmi Swami
0
Reputation points
I have set HorizontalScrollBarVisibility="Auto"
in my WPF application. My grid contains two graphs that adjust their height and width dynamically. However, when resizing the screen to a certain width where the scrollbar appears, the screen starts flickering due to the graph resizing.
Ideally the graphs should maintain a stable size and prevent excessive flickering when the scrollbar appears.
so how can i avoid flickering and what are best practices for handling dynamic resizing in this scenario?
I have adde
<Grid Grid.Row="1"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"></ColumnDefinition> <ColumnDefinition Width="*"></ColumnDefinition> </Grid.ColumnDefinitions> <ContentControl Grid.Column="{Binding LeftPanelColumn}" FocusVisualStyle="{x:Null}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Content="{Binding LeftGraph, UpdateSourceTrigger=PropertyChanged}" /> <ContentControl Grid.Column="{Binding RightPanelColumn}" FocusVisualStyle="{x:Null}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Content="{Binding RightGraph, UpdateSourceTrigger=PropertyChanged}" /> </Grid>
Developer technologies | C#
Sign in to answer