In DataGridRow ControlTemplate, how to bind to DataGridRow.IsSelected? #17851
Unanswered
arnirichard
asked this question in
Q&A
Replies: 2 comments 3 replies
-
Not tested if it really works, but you could follow the pattern of the DataGridRow ControlTheme of avalonia, it uses this pattern for styling a selected row: <ControlTheme x:Key="{x:Type DataGridRow}" TargetType="DataGridRow">
<Style Selector="^:selected">
<Style Selector="^ /template/ ItemsControl#itemsControl">
<Setter Property="IsVisible" Value="True" /> <!-- and default you set is isvisible false, also using a Style i think -->
</Style>
</Style>
</ControlTheme> |
Beta Was this translation helpful? Give feedback.
0 replies
-
@msneijders I had tried this, but it does not work
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have this code.
I need to set 'itemsControl' to Visible only when DataGridRow is selected, I can't find out how to do it, but I suspect it is easy.
Please help.
Ok, I found this solution, not very pretty but it works
Beta Was this translation helpful? Give feedback.
All reactions