Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
265
Binding in ContentPane.TabHeaderTemplate doesn't work
posted

Hello,

I wan't to customize the header and Tabheader of a igDock;ContentPane to a binding source.
After my search i solved the Problem for the header, (make HeaderTemplate; bind it to an invisible Textbox and bind the Textbox with code to my object).

But for the TabHeaderTemplate it doesn't work....

Is there a bug? or where is the failure?

For example:

    <igDock:ContentPane.HeaderTemplate>
        <DataTemplate>
            <TextBlock Text="{Binding ElementName=myHeader, Path=Text}" />
        </DataTemplate>
    </igDock:ContentPane.HeaderTemplate>
    <igDock:ContentPane.TabHeaderTemplate>
        <DataTemplate>
            <WrapPanel>
                <TextBlock Text="xy" />
                <TextBlock Text="{Binding ElementName=myHeader, Path=Text}" />
            </WrapPanel>
        </DataTemplate>
    </igDock:ContentPane.TabHeaderTemplate>
    <igDock:ContentPane.Content>
        <Grid>
            <TextBlock x:Name="myHeader" Visibility="Hidden" />
        </Grid>
    </igDock:ContentPane.Content>

------- c# behind

Binding b = new Binding("Name");
b.Source = myHeaderNode;
myHeader.SetBinding (TextBlock.TextProperty ,b);

#########

This works fine for the header, but the tabheader always raise "Cannot find source for binding with reference 'ElementName=myHeader'"

with greetings from germany

Thomas

Parents Reply Children
No Data