WPF ListView Accessability an element IsOffScreen error
Using the sample code: https://learn.microsoft.com/en-us/dotnet/desktop/wpf/controls/how-to-create-a-custom-view-mode-for-a-listview?view=netframeworkdesktop-4.8
I modified the ListView style to use a StackPanel instead of a WrapPanel to get a 1 row scrollable view.
<Style x:Key="{ComponentResourceKey
TypeInTargetAssembly={x:Type l:PlainView},
ResourceId=myPlainViewDSK}"
TargetType="{x:Type ListView}"
BasedOn="{StaticResource {x:Type ListBox}}"
<Setter Property="HorizontalContentAlignment"
Value="Center"/>
<Setter Property="ItemContainerStyle"
Value="{Binding (ListView.View).ItemContainerStyle,
RelativeSource={RelativeSource Self}}"/>
<Setter Property="ItemTemplate"
Value="{Binding (ListView.View).ItemTemplate,
RelativeSource={RelativeSource Self}}"/>
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" Width="{Binding (FrameworkElement.ActualWidth),
RelativeSource={RelativeSource
AncestorType=ScrollContentPresenter}}"
/>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
</Style>
Whith this change I get and error from the Accessibility Insights tool. An element's IsOffScreen Property must be false when its clickable point is on screen.
How do I get this same behavior without getting this error?