MarkDownTextBlock ignors setting the Text-Property to an empty string
Setting the Text-Property to an empty string should clear the current content
Nuget Package(s):
Package Version(s):
Windows 10 Build Number:
- [ ] Anniversary Update (14393)
- [ ] Creators Update (15063)
- [x] Fall Creators Update (16299)
- [ ] Insider Build (build number: )
App min and target version:
- [ ] Anniversary Update (14393)
- [ ] Creators Update (15063)
- [x] Fall Creators Update (16299)
- [ ] Insider Build (xxxxx)
Device form factor:
- [x] Desktop
- [ ] Mobile
- [ ] Xbox
- [ ] Surface Hub
- [ ] IoT
Visual Studio
- [x] 2017 (version: current)
- [ ] 2017 Preview (version: )
Looks like it also ignores whitespace. @WilliamABradley, any ideas?
Is this happening when you set the Text to empty from code behind? Or from XAML? I don't see that happening though in either cases.
... in both, code and XAML binding.
You also can see this in the sample app when deleting all text in the upper textbox.

@nmetulev according to current code
This will ignore NullOrWhiteSpace. We should remove this check completely.
Great find, could you submit a PR?
WOI
PR merged
Most helpful comment
@nmetulev according to current code
https://github.com/Microsoft/UWPCommunityToolkit/blob/ada7903eb841aca389571fcd3cefb83b46da5e59/Microsoft.Toolkit.Uwp.UI.Controls/MarkdownTextBlock/MarkdownTextBlock.Methods.cs#L47-L51
This will ignore
NullOrWhiteSpace. We should remove this check completely.