MudSplitter questions
Hello,
Maybe this has been asked and answered before, but I was not able to find those answers.
I'm trying to achieve a sort of file explorer type layout behavior (one content is locked while the rest fills the space) and I was wondering if it's possible with MudSplitter or not.
What I'm trying to achieve is the following:
- The StartContent has a starting/initial size in pixels (or some other unit) and the EndContent fills the remaining area.
- The StartContent size should remain the same if the browser window is resized.
- The user can use the splitter to change the size/dimension.
- The Start- and EndContent should have a minimum size set which prevents the splitter bar from moving all the way to the left or right.
The only property I could find to set an initial size was Dimension, however that is percentage based and thus means different things depending on the browser window.
So, is it possible to set initial pixel sizes or placement of the divider, and lock the StartContent so it doesn't resize when the browser window changes in size etc.?
Nice idea. But splitter controlled with a slider, I think it's not currently possible to set pixels. But you can use resize observer and set StartContent percentage manually when user resize the screen.
Setting min and max value is possible i think. We already added min and max for the MudRangeSlider.
I'm guessing that what I'm trying to do could be seen as an anti-pattern or anti-design as it is the opposite of being flexible/responsive with the sizes, sort of the whole point of flexbox.
Regardless, I was able to find a library that had implemented this and if anyone is looking for the same and stumbles on this post then I'm using this: https://github.com/jsakamoto/Toolbelt.Blazor.SplitContainer
It allows me to set a fixed size for one of the containers (as well as minimum etc.) and let the rest adapt/fill the remaining spaces.
It would however be nice to have the same features on MudSplitter if anyone has the knowledge or experience to be able add the support. I am fairly new with Blazor so I feel it's safer to try and use what is out there to start with.
The main idea of MudSplitter is make a non-js and smooth solution. We can think what we can do about pixel sizing.
+1 for the minimum sizes!