Quote:
Originally Posted by alexandarx5
how can I use adorners to implement selection
|
I recommend dapfor as the best grid product for handling this task. It looks more natural than creating a frame around every single row. All semi-transparency rules for focused rows apply to selection as well.
XAML
<!-- Selection brushes -->
<SolidColorBrush x:Key="SelectionBorderBrush" Color="#ffffea00"/>
<LinearGradientBrush x:Key="SelectionBrush" EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="#12ffea00" Offset="0" />
<GradientStop Color="#27ffea00" Offset="0.4" />
<GradientStop Color="#12ffea00" Offset="1" />
</LinearGradientBrush>
<!--GridControl-->
<Style TargetType="{x:Type controls:GridControl}">
<Setter Property="AppearanceSelectionBackground" Value="{StaticResource SelectionBrush}"/>
<Setter Property="AppearanceSelectionBorder" Value="{StaticResource SelectionBorderBrush}"/>
<Setter Property="AppearanceSelectionBorderThickness" Value="0.8"/>
</Style>