-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Goal
Need to put a popup over Name header in DataGrid

Attempts
Tried to set ElementID through style or directly, in turn
<Style x:Key="TourNameHeaderStyle" TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="tour:TourHelper.ElementID" Value="Name"/>
</Style>
<DataGridTextColumn Binding="{Binding name}" HeaderStyle="{StaticResource TourNameHeaderStyle}">
<DataGridTextColumn.Header>
<TextBlock Text="Name" tour:TourHelper.ElementID="Name"/>
</DataGridTextColumn.Header>
</DataGridTextColumn>Result
Can not find Name in both cases
Could not find visual element with ElementID 'Name'.
Popup may not occur. Ensure that the visual element is available in the current view.
Reason?
Guess, it's because DataGridTextColumn is not in the same visual tree as rest elements.
VisualTreeHelper is used everywhere in ThinkSharp.FeatureTouring.Helper.WpfUtils.
Workaround
Fake Control over the header is not an option since columns can be resized, reordered, shrunk by main window, etc.
Question
Is it possible to overcome this?
Metadata
Metadata
Assignees
Labels
No labels