question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TabItem Header Binding Not work in MVVM

See original GitHub issue

for prism mvvm we need to bind tabitem header to a property

 <UserControl.Resources>
        <Style BasedOn="{StaticResource TabItemStyle}" TargetType="TabItem">
            <Setter Property="Header" Value="{Binding DataContext.Title}" />
        </Style>
    </UserControl.Resources>

after this commit https://github.com/handyorg/HandyControl/commit/f4b1796f984800c90a799e97612446f77bdabacd binding not work

Before this commit, everything worked fine Untitled

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
NaBiancommented, Aug 4, 2020

i mean you could use prism without hc (remove refrence, clear app.xaml) and try again.

I tried, it worked.

0reactions
ghost1372commented, Aug 4, 2020

thank you @NaBian Setting the ItemContainerStyle and Foreground solved the problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

Binding not working in Mvvm wpf and controltab
Hello the error is the first time to init my tab the binding work but when i want to change value of my...
Read more >
Problem with TabControl Template and Binding in WPF.
I would like to put image in TabControl header using binding, but below code doesn't work. I would like to know why, and...
Read more >
[Solved] WPF MVVM Problem in TabItems
I'm using wpf and mvvm pattern, in my program when you select a row in datagrid if ID equal zero Save Button Enabled...
Read more >
DataBinding in WPF TabControl (TabControlExt)
To bind ItemsSource to TabControl , you need to have collection with data object which holds header and content details. Here, Model class...
Read more >
MVVM de la découverte à la maitrise - Page 180 - Google Books Result
Dock="Bottom" ItemsSource="{Binding StatusMessages}" /> <TabControl> <TabItem Header="Liste des livres" IsSelected="True"> <views:LivreMaitreDetail ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found