wpfui
wpfui copied to clipboard
DataGrid Row events don't fire
Describe the bug
Hi,
I'm trying to have row double click functionalty on the datagrid but the events don't fire. In normal WPF the events do fire when set using this way 👇
<ui:DataGrid
Margin="0,10,0,0"
AutoGenerateColumns="False"
BorderBrush="{DynamicResource ControlStrongFillColorDarkBrush}"
BorderThickness="1"
CanUserReorderColumns="True"
CanUserResizeColumns="True"
CanUserSortColumns="True"
GridLinesVisibility="All"
IsReadOnly="True"
ItemsSource="{Binding Clients}"
SelectionMode="Single"
SelectionUnit="FullRow">
<ui:DataGrid.Resources>
<Style TargetType="DataGridRow">
<EventSetter Event="MouseDoubleClick" Handler="Control_OnMouseDoubleClick" />
</Style>
</ui:DataGrid.Resources>
</ui:DataGrid>
To Reproduce
- Create a DataGrid
- Assign ItemSource
- Set Row event
- See events don't fire
Expected behavior
Row events must fire.
Screenshots
No response
OS version
Win 11
.NET version
.Net 8
WPF-UI NuGet version
4.0.2
Additional context
No response
Something in DefaultDataGridRowStyle appears to break it.