Comments (11)
Comment created by @GeertvanHorrik:
No, posting it here is preferred. Jira provides much better workflow handling and much more than codeplex does.
from catel.
Comment created by @GeertvanHorrik:
I can reproduce the behavior in your app. Now trying to see why it happens.
from catel.
Comment created by @GeertvanHorrik:
It's strange that the actual DataContext of the SettingsWindow is the view model. The DataContext should remain nothing, the inner grid datacontext should be the SettingsViewModel. Maybe it has to do with the fact that these are data templates. Still figuring out.
from catel.
Comment created by @GeertvanHorrik:
Yes, that is the issue. They are DataTemplates and are selected based on their datacontext. The SelectedItem is the CurrentViewModel which then works a bit different.
It is best to simply create 2 tabs with different views and let the views take care of the view model construction.
from catel.
Comment created by @GeertvanHorrik:
To fix this, please use the following steps:
-
Clear all code-behind in MainWindowViewModel
-
Change your MainWindow xaml to:
<TabControl > <TabItem Header="{Binding RelativeSource={RelativeSource Self}, Path=Content.ViewModel.Title}"> <views:HomeWindow /> </TabItem> <TabItem Header="{Binding RelativeSource={RelativeSource Self}, Path=Content.ViewModel.Title}"> <views:SettingsWindow /> </TabItem> </TabControl>
from catel.
Comment created by ericyu:
Do you meaning this case has been fixed?
Actually, I have same issue. My case is first tab is list data, when i click one of this list, program should create new tab with selected item data, since tab item added base on click, I can't pre-set tabitem.
Could you give me some suggestion?
Environment:
.NET 4.0, VS2010, Catel 3.9
from catel.
Comment created by @GeertvanHorrik:
It was a bug in the user code. Try using the 2 hints I gave in my last comment.
from catel.
Comment created by ericyu:
beside this option, any another idea?
I would like locate viewmodel first then get view,
it looks you release view everytime when I switch to another tabitem, but when switch back new view lost binding.
from catel.
Comment created by @GeertvanHorrik:
The TabControl provided by Catel (see Catel.Extensions.Controls) has several different options to control the behavior. If you think you found a bug in the latest prerelease (note we fixed a lot from 3.90 => current state), please provide a repro.
from catel.
Issue was closed with resolution "Fixed"
from catel.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
from catel.
Related Issues (20)
- question.is it possible to use with prism. HOT 1
- Injecting IAuthenticationProvider does not affect Commands HOT 1
- Allow serialization of Classes implementing IDictionary<TKey,TValue> HOT 1
- Consider specifying Foreground Color in InfoBarMessageControl HOT 7
- [ ] WPF d:DataContent compile error HOT 2
- Implement nullable support HOT 1
- Serializer trapped in endless loop when deserializing HOT 2
- Remove unnecessary references for netfx(net4x) targets HOT 2
- Removing a ChildViewModel does not re-validate the ParentViewModel HOT 2
- Deadlock in ServiceLocator HOT 4
- Cannot deserialize model from encrypted string
- StringToObjectHelper.ToRightType returns wrong values for type byte HOT 2
- Duplicate subscription to window completed callback in UIVisualizerService
- Change Execute and CanExecute methods for CommandContainerBase to public
- "Serializing delegates is not supported on this platform" exception in ChildAwareModelBase.BeginEdit method HOT 4
- Remove TypeExtensions.IsSerializableEx
- Disable TypeCache reflection only checks
- Prevent duplicate property change notification when using ViewModelToModel attribute on models that don't check for equality before raising HOT 2
- Validation for UserControl problems
- CacheStorage should not enable auto expiration by default without default policy
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from catel.