I'm trying to create my own GridViewColumn and having some issus with binding.
Can someone explain to me why the following Header-binding does work
<GridViewColumn x:Class="interneProzesse_UebersetzungstoolNS.TranslateGridViewColumn"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:conv="clr-namespace:interneProzesse_UebersetzungstoolNS.Converter"
xmlns:hk="clr-namespace:interneProzesse_UebersetzungstoolNS.Hilfsklassen"
xmlns:local="clr-namespace:interneProzesse_UebersetzungstoolNS"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300"Header="{Binding RelativeSource={RelativeSource Self}, Path=Sprache, UpdateSourceTrigger=PropertyChanged}">
</GridViewColumn>
while it fails here?
<GridViewColumn x:Class="interneProzesse_UebersetzungstoolNS.TranslateGridViewColumn"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:conv="clr-namespace:interneProzesse_UebersetzungstoolNS.Converter"
xmlns:hk="clr-namespace:interneProzesse_UebersetzungstoolNS.Hilfsklassen"
xmlns:local="clr-namespace:interneProzesse_UebersetzungstoolNS"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<GridViewColumn.Header>
<GridViewColumnHeader Content="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:TranslateGridViewColumn}}, Path=Sprache, UpdateSourceTrigger=PropertyChanged}"/>
</GridViewColumn.Header>
<GridViewColumn>
Sprache
is a Property of my TranslateGridViewColumn which inherits from GridViewColumn.