I dropped a SplitContainer in a form. For visual purposes, I added a MonthCalender in Panel1 and DataGridview in Panel2, both Dock=Fill. In both panels, I set ShowHeader=true and in set Panel1.Collapsed=true.
At runtime, Panel1 Header is is not visible at all and can’t expand it. In Panel2, the DataGridview does not fill the full width of the panel.
Am I missing something?
Yes the MonthCalendar is now resizable when AutoSize = false. Will check the week number column, thanks for the report.
The collapsed panel state at design time still needs more tweaking. See my other reply.
The property you are looking for is MaxSelectionCount. If you set it to 1 it is single selection. Otherwise the multiple selection works by anchoring the first click and using the second click as the end of the range. The anchor is reset when the mouse moves out of the calendar. It’s like selecting a range on airline or hotel websites.
The MaxSelectionCount limits the range.
Best and thank you again for your efforts.
These are the behaviour I observed in SplitContainer in 1.2.78.
If I set Panel1Collapsed=true, the Header shows up properly. But if reset it back to false, it doesn’t restore to where it was before I set it to true. I have to drag the vertical splitter to the right to resize and see all controls inside the panel. It works fine if I set Panel1Collapsed=true at runtime though, as suggested by Luca. But the fact remains the designer does not behave the way it should be.
Now that MonthCalendar can be docked and resized, the column for WeekNumber also resizes whether ShowWeekNumbers is set to true or false. Is it by design? In my personal opinion, this column must have a fixed width.
There are times that when I click on a single date, it selects mulitple dates as shown on the image attached though I don’t see any property regarding this behaviour.
There are still a number of open issues with panels starting in the collapsed state from design time. If you design the window in the same not-collapsed and add, as a workaround, this.splitContainer1.Panel1Collapsed = true in Window1.OnLoad() it works a lot better. Remove also this.splitContainer1.Panel1.Collapsed = true. It’s an inner property that shouldn’t be serialized.
Another issue is the different internal bounds when sliding a panel that had the header at the top and collapsed to the sides. They should all be fixed within the next days.
Also, MonthCalendar cannot dock. It can, but the inner size is always the same as it depends on CalendarSize. As of now the calendar widget cannot adapt its internal layout to the outer size. The size is regulated by the theme. We may be able to make the inner layout dynamic later.