You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SplitView control after it initialized does not have :open or :closed pseudoclass set. Regardless of the value in the IsPaneOpen property.
To Reproduce
Create Window with a SplitView control, set IsPaneOpen to any value (e.g, by binding to ViewModel)
Run the application in Debug, open Debug tools
In Logical Tree, find SplitView. The SplitView doesn't have :open / :closed pseudoclass set regardless of the value in the IsPaneOpen property.
Pseudoclass is set only after first change of IsPaneOpen property
Expected behavior
SplitView control after initialization should have :open / :closed pseudoclass set depending of the value in the IsPaneOpen property
Avalonia version
11.1.0
OS
Windows
Additional context
After looking into SplitView.cs source code, the problem appears to be that the logic for changing pseudoclass based on IsPaneOpen value is present only in OnPropertyChanged method. Adding same logic to constructor should fix the issue
The text was updated successfully, but these errors were encountered:
@OccVeneficus if you have an idea how to solve it, a PR is welcome.
Created PR with fix. While working on it discovered that issue reproduces only if before added on view tree IsPaneOpen property is set to false, in that case :closed pseudoclass won't be added after control first rendered.
…zation #17176 (#17178)
* test(SplitViewTests.cs): added failing test for issue #17176
* fix(SplitView.cs): added pane state pseudo class update in OnApplyTemplate
- fixed#17176
* test(SplitViewTests): added globalclock mock to failing test
Describe the bug
SplitView control after it initialized does not have
:open
or:closed
pseudoclass set. Regardless of the value in theIsPaneOpen
property.To Reproduce
Create Window with a SplitView control, set IsPaneOpen to any value (e.g, by binding to ViewModel)
Run the application in Debug, open Debug tools
In Logical Tree, find SplitView. The SplitView doesn't have
:open
/:closed
pseudoclass set regardless of the value in theIsPaneOpen
property.Pseudoclass is set only after first change of
IsPaneOpen
propertyExpected behavior
SplitView control after initialization should have
:open
/:closed
pseudoclass set depending of the value in theIsPaneOpen
propertyAvalonia version
11.1.0
OS
Windows
Additional context
After looking into
SplitView.cs
source code, the problem appears to be that the logic for changing pseudoclass based onIsPaneOpen
value is present only inOnPropertyChanged
method. Adding same logic to constructor should fix the issueThe text was updated successfully, but these errors were encountered: