-
Notifications
You must be signed in to change notification settings - Fork 178
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
[Bug] SettingsLayoutItem Header Not Updating Dynamically and Fails to Display When Using Binding #432
Comments
I had a look through the code of the I believe a rewrite for the entire TLDR: we need to break things, to make this work well. |
I plead guilty on this one 👀 I didn't even expect that someone would use the SettingsLayout except me, so to use it as bindable .. I'm not against a rewrite, but I think it will be a little difficult (Handling scroll, .. ) |
Yea, its not an easy task. I dont see a way to make this MVVM compliant, but one could perhaps manually add a binding between |
@SweetSmellFox can you check my PR here and whether this solves your issue? I tested this locally and it seems to work with changing the text in the textblock via code behind. |
I have a small question. If the author doesn't merge the PR, how can I obtain the generated DLL after merging((( |
You could build the code yourself and use it in your project the old fashioned way, by referincing the dll you build yourself. edit: the CI builds also provide an artifact, if you dont like building sukiui yourself |
I tested the changes, and the binding now works as expected. Thank you! |
I tested it and found that using this code, you can achieve dynamic binding without converting the Header to a TextBlock.(
|
I've updated the PR accordingly. |
Don't worry, you know the goal of the library is to have better controls, not keeping flawed logic ^^ |
Check the following items
Description of the issue
The Header property of SettingsLayoutItem exhibits two critical issues:
Static Display: The displayed header does not update when the Header value changes dynamically (e.g., through code).
code:
video:
test.mp4
Binding Failure: When binding the Header property (e.g., Header="{Binding MyHeader}"), the header text does not render at all, even if the bound property updates correctly.
View:
ViewModel:
Screenshot:

Package Version
6.0.1
Environment
Windows 11 22631
Expected Behavior
The displayed header should update dynamically when the Header property changes.
Binding to the Header property should display the bound value and update it reactively.
Reproduction
Define a SettingsLayoutItem with a static Header value (e.g., Header="Initial Header").
Dynamically update the Header value (e.g., via a button click event).
csharp
settingsLayoutItem.Header = "Updated Header";
Observe that the UI does not reflect the new header value.
Replace the static Header with a binding:
xml
Ensure DynamicHeader is initialized and updated correctly in the ViewModel.
Observe that the header remains blank despite valid binding.
Additional Information
No response
The text was updated successfully, but these errors were encountered: