Open ismaelestalayo opened 3 years ago
Hello ismaelestalayo, thank you for opening an issue with us!
I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌
By suggestion of @michael-hawker himself on the UWP discord, I copied the whole template of HeaderedContentControl
from your repo into my style as a workaround and it works.
@ismaelestalayo Thanks for showing interest here and finding a bug. Do you want to create a PR and will test it out?
Yeah, looks like this may be an issue with us not properly templatebinding to the required properties.
I'd totally do it, the thing is I dont really know what exactly is there to change in the file HeaderedContentControl.xaml or why adding the exact same template in my page fixed the problem.
I feel like part of the problem could be the content template is a TextBlock
accepting a binding, and then the content itself is being set as another TextBlock
, so that could be causing some issues.
@niels9001 I know we're revamping this for 8.0, so something or us to keep in mind or at least potentially show some examples of overriding different parts of the templates.
Describe the bug
When styling the
HeaderTemplate
orContentTemplate
of theHeaderedContentControl
, if the text of any of them is set with the<Run/>
blocks instead of directly as a string or a singlebinding
, the text is not displayed.Steps to Reproduce
This can be reproduced just with this little XAML snippet. Just create a
HeaderedContentControl
with custom styles for both the Header and the Content; one of them passing as a single string inline, and the other one as<Run/>
blocks.The result of this snippet is the following (tried both in Visual Studio, and in XAML studio just in case):
Expected behavior
Expected behaviour would be the text to be displayed correctly, instead of displaying the object of the page.
Environment