I have a DataGridTextColumn and Element Style set tp a type TextBox and i have a validationstyle place for the TextBox which highlights the Cell with Red Border in case of it doesn't have any values. (like a Required Field Validation)
<Style x:Key="TextBoxValidationStyle" TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}">
<Style.Triggers>
<Trigger Property="Validation.HasError" Value="True">
<Validation.ErrorTemplate>
<ControlTemplate>
<DockPanel>
<Border BorderBrush="Red" BorderThickness="1">
<AdornedElementPlaceholder x:Name="controlWithError"/>
</Border>
<TextBlock Foreground="Red" FontSize="20" FontFamily="Segoe UI" Margin="3,0,0,0" />
</DockPanel>
</ControlTemplate>
</Validation.ErrorTemplate>
<Setter Property="ToolTip" Value="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
</Trigger>
</Style.Triggers>
</Style>
the problem is : My First Column of the Grid is fixed and when i scroll horizontally , the error cell (with red border) overlaps the static columns.
expectation : as soon as the cell starts going behind the fixed column it should hide the border same as other content on the grid.
Any suggestions?