Would it be possible to add a property to set a maximum amount open blades count?
So for instance, if set to 3, only the last 3 blades are shown full width, the ones before that are shown in small size.
A bit like the splitview, with wide and narrow mode. So only the last blades are in wide mode, the ones before in narrow mode.
This would help users with the amount of scrolling if a lot of blades are open... and keep content on 1 page in desktop mode if possible.
How about:
OnBladeOpened(object sender, BladeItem item)
{
var blade = (BladeView)sender;
foreach(var bladeItem in BladeView.ActiveBlades.Skip(1).Take(blade.ActiveBlades.Count - 3).ToList())
{
bladeItem.IsOpen = false;
}
}
To be sure ( not seeing this on the current video of the example ), IsOpen = false will still show the blade somehow? I don't want it gone, just small...
And yes you could code it, but that is manual labor I would love te be hidden in the control itself ;)
By the way the link to the example on the root of the GitHub readme is broken!
Currently IsOpen will just hide the blade.
but that is manual labor
I just did the labor for you ;)
Which link is broken?
The link is ready for the new name (BladeView). I will merge to master today and then the link will be operational :)
Ok... hiding the blade is not my intent!
So my request still stands :)
The original design was a reflection of the Azure portal, there the blades will also go in small mode when many are open ( just saying ;) )
There is currently no way to collapse a blade. This is planned for 1.3
@Depechie fancy trying to submit a PR? Else I don't think this will make it for 1.4 (Closing on 3/21)
Have a working demo on my fork... but not yet PR ready.
Will update when I have more time...
But to finish it, I have some questions on the current control. Is there a place where I can discuss these? And not overload this issue thread?
You can email me @Depechie
Current implementation : https://youtu.be/osNimMhqKw8
Would love to discuss this to see what still needs to be done or not before submitting PR.
I never through about collapsing like that. It looks nice!
When I was working on this I was making a collapse button that would just have the title bar visible but rotated 90 degrees. This allowed you to still see the title and only take up about 30 pixels wide.
I don't think the blades should auto collapse. Easy enough to scroll to find the one you want.
@skendrot what do you mean with 'auto collapse'? Currently the property on the BladeView ( OpenBlades ) will trigger the collapsing when set.
So say OpenBlades = 3, means when a 4th one is opened, all others collapse. The auto collapsing in this case is the whole point at that stage. Or do you mean something else?
Secondly, I would rather first round up this implementation. This would allow @deltakosh to draft up a todo list for the control and set a release target. Because to be honest I don't think I can manage all the requests for even making this better ( not that good at control creation ;) ). So @skendrot or others can take over to add more :)
What does everyone think?
I like how it looks like. I will discuss it with core team but I guess we can plan it for 1.5
Great, just realising that I did not yet have taking into account any content that could be visible on the blade itself.
The PR will just alter the width of the blades, I think we better also blur or hide the content otherwise it will look silly?
Anyhow I hope this is a good foundation to extend the control :)
@Depechie maybe BladeView should have a view state for open / collapsed state. That way it can be customised.
@Depechie I'm all for this, it looks quite nice. I think minor changes would be around the auto collapse (possibly have that as an additional option so the developer can choose whether to have it on or not) and also if you expand a collapsed blade, have the ability to then collapse it again without having to add another blade.
@jamesmcroft we should use value of 0 to indicate whether auto collapse is supported or not.
@jamesmcroft yep @hermitdave is correct, default value is 0 for MaxOpenBlades what will be equal as saying, I don't want the feature :)
Your suggestion on all being able to close manually before reaching the max count is indeed a good suggestions too!
But like I stated on top, would love for @deltakosh to see how far we go for v1 update on this, extra's can later always be added I guess.
Hello I do not want to block you :)
The idea is to first ensure that everyone is ok with the features to add so could you please list them?
To sum up:
Do you see other things?
Nope sounds great, except for the themeable header. Not something I can write on my own.
I'll handle the 2 other options in the current PR and report when done!
Themeable is not a big deal. Just provide two views for your control: one is hidden when collapsed and one is hidden when not collapsed
Improved the PR, but VisualStates seems not possible. Did several other changes as requested :)
Closing via #1049