Closed sn4k3 closed 1 year ago
@sn4k3 It works for me with current master. Can you test it with nightly builds? There were some fixes in SelectionModel that could affect this.
There's any place i can download the compiled nightly builds? Or i need to compile the master? I'm currently using nuget package on the project
Still not working, tried with: 0.10.999-cibuild0010903-beta PS: I'm using IsEnabled for now to overcome this problem, and it works, i'm saying this to discard the thinking of property not correctly set. Full source: https://github.com/sn4k3/UVtools/blob/master/UVtools.WPF/MainWindow.axaml#L330
@sn4k3 control should be notified when value was changed. For instance, it can be achieved using INotifyPropertyChanged or AvaloniaProperty. In your code you have INotifyPropertyChanged in the Window, but there is no any notifications when HaveGCode is changing. As solution, you can run OnPropertyChanged(nameof(HaveGCode)) when file is loaded/unloaded and HaveGCode changes its value.
I force a data context reload on every file load:
public void ResetDataContext()
{
var old = DataContext;
DataContext = new object();
DataContext = old;
}
As told with Enable property it work good: When file is closed it got disabled, when file is loaded it got enabled
But i will try OnPropertyChanged(nameof(HaveGCode))
Just tried with OnPropertyChanged(nameof(HaveGCode)). Still doesnt work with IsVisible
Video: https://youtu.be/FsLMC8s3u-g
@sn4k3 can you share some file example, so I can try to reproduce it in the app?
Sure, try this one (Only UVtools.Core and UVtools.WPF projects are required to run the app)
Thanks. I reproduced it. Weird that it worked for me after I replaced HaveGCode with simple property and updating value with OnPropertyChanged after 5 seconds delay in window ctor.
I will take a deeper look later.
Any new on this? i still have this problem with rc1
@grokys
Pinging @Gillibald as he wrote the TabControl
and may be able to fix it quicker than me.
Works now
Works now
I still have the problem... Tab doesnt show up. On: 0.10.10
No longer a problem with v11.
<TabItem IsVisible="{Binding boolVarHere}">
This correctly hides TabItem from TabControl, but when set the variable to true it won't show up ever again