nikobarli
Topic Author
Posts: 180
Joined: 26 Apr 2017, 06:23

Cannot bind the Content of GridViewColumnHeader

29 Oct 2019, 06:22

Hi, I have a XAML as follows, which tries to bind the Content of a GridViewColumnHeader.
However, the binding is not evaluated.
       <ListView>
            <ListView.View>
                <GridView>
                    <GridViewColumn>
                        <GridViewColumnHeader Content="{Binding BindingText}"/>
                    </GridViewColumn>
                </GridView>
            </ListView.View>
        </ListView>
Debugging the source code, I found that the DataContextChanged of the GridViewColumnHeader is not called. Weirdly, the following code is working and showing the column header correctly.
       <ListView>
            <ListView.View>
                <GridView>
                    <GridViewColumn Header="{Binding BindingText}" />
                </GridView>
            </ListView.View>
        </ListView>
Is it a known bug ? I am currently using version 2.2.3.
 
User avatar
sfernandez
Site Admin
Posts: 2991
Joined: 22 Dec 2011, 19:20

Re: Cannot bind the Content of GridViewColumnHeader

29 Oct 2019, 10:12

Yes, I think it is the same bug as this one: #1559
We fixed it for the next release that is coming soon.

Who is online

Users browsing this forum: Ahrefs [Bot], Semrush [Bot] and 72 guests