07-13-2016, 06:33 PM
(This post was last modified: 07-13-2016, 06:36 PM by robertosalemi.)
Hi,
i have a DataGrid, this is the source code:
I have to check is vertical or horizontal scrollbars are visible.
I use this code fro get the properties of DataGrid, but it not works:
Thanks for the support.
i have a DataGrid, this is the source code:
Code:
<DataGrid x:Name="commonStepGrid" AutoGenerateColumns="False" HeadersVisibility="Column"
Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Margin="2"
SelectionChanged="commonStepGrid_SelectionChanged" CanUserAddRows="False" CanUserDeleteRows="False" CanUserResizeColumns="True"
SelectionUnit="FullRow" SelectionMode="Extended"
ScrollViewer.CanContentScroll="True" IsReadOnly="True"
HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"
AlternationCount="2" >
I have to check is vertical or horizontal scrollbars are visible.
I use this code fro get the properties of DataGrid, but it not works:
Code:
cc = WpfWindow("myApp").WpfTable("commonStepGrid").Object.HorizontalScrollBarVisibility
bb = WpfWindow("myApp").WpfTable("commonStepGrid").Object.VerticalScrollBarVisibility
Thanks for the support.