-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Savablz 🎉 #210
base: master
Are you sure you want to change the base?
Savablz 🎉 #210
Conversation
It made my visual studio put squiggles everywhere, making the code unreadable. Or maybe is it Resharper?
It looks like I'm using new features of C# that are not available on appveyor? Would you like me to fix that, or do you want to update your appveyor to vs2017 ? |
to support appveyor build
Hi, |
How do i DownLoad your commits? |
You can use the .nupkg from here https://ci.appveyor.com/project/ButchersBoy/dragablz/build/0.0.3.210/artifacts |
Hi, |
I found on your github, thanks. |
@jeremyVignelles |
@zenchanhk : sorry for the delay. I don't know where that ghost comes from, but I don't see how it could be caused by this PR. Do you have a repo when I can try to reproduce your issue? |
@jeremyVignelles Hi, I downloaded your sample and I have a question. Woh would you implement your solution if you had different views/viewModels in each tab? |
I'd have one TabContentModel that might be defined with a I didn't test it tough, just an idea. |
Another way I can think of is to make all your model implement the same ITabModel interface, and play with the Newtonsoft.Json's serialization options |
Thanks a lot :) |
I guess the author, like many other open source devs have no more time to maintain it or has lost interest in maintaining it. EDIT: His status reads "Taking a break from open source."... |
Background
This is the first implementation of what I call "Savablz", layout windows that can be saved.
I think this is a required feature for many of us : #201, someone on gitter asked, this, I needed this, and you also had to do that too in doobry.
I'm pretty new to the project so I admit I've no idea if I cover all the cases.
Implementation
I've read what you did in https://github.com/ButchersBoy/doobry/blob/master/Doobry/MainWindowViewModel.cs , but this implementation:
Note: this PR is based on top of #207, feel free to cherry pick if you don't want that.
I also implemented a new Sample project that demonstrates how that works.
How it works
WindowsStateSaver.GetWindowsState<TModel, TViewModel>(viewModelToModelConversionFunction)
to get the state of all windows in this app.WindowsStateSaver.RestoreWindowsState(window.InitialTabablz, state, modelToViewModelConversionFunction)
. The window must be shown beforehand for this to work.About the new sample project
This sample is aimed at providing a simple getting started for the common scenario. It is not meant to provide a full documentation. It is however a good way to get started.
Tabs are just showing a GUID in the header and in the content. The view model is very simple, and so is the Model, but it is here to demonstrate how things work together. When the "main" window is closed, the state is saved and is restored at next startup, thanks to the .net's
Settings
mechanism.When the last tab of the main window is closed, the settings are reset and a fresh configuration is generated on the next startup.
Questions
Partition
. What happen when we have multiple partitions? What should be done?