Search code examples
wpfdatagridadorner

wpf datagrid FrozenColumnCount and usercontrol with adorner


i have a DataGrid with FrozenColumnCount set to one and some DataTemplateColumns which contains a control which uses an adorner (simply lets say a TextBox with an Adorner which shows the Text "Unit" or somelike). If I use the HorizontalScrollbar the adorner lays before the fixed column. How can I solve this problem.


Solution

  • This is the nature of Adorners, they will always be on "top".

    Anything placed in the adorner layer is rendered on top of the rest of any styles you have set. In other words, adorners are always visually on top and cannot be overridden using z-order.