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
{{ message }}
Repository navigation
Command palette search results should bold the matching text #6646
Yes, that's easy enough, but then we need to hook up a lot more XAML - the Palette knows which characters need to be highlighted, so it would need to set that on each of the commands in the match list, then each of those guys would need to return a Run instead of just a string.
It's not impossible, but it's a lot more XAML binding than anything I've done
Defining a model that instead of a name stores a vector of matched and not matched segments - easy
Now let's bind it to the runs - the WinRT Textblock::Inlines are not bindable (ouch)
No problem, let's register an attached property and create runs in code behind - coded everything (even with nice converter), XAML complains on the binding. Reading WinRT docs (ouch 2):
Ha, good luck defining imperatively dynamic context without tons of code-behind. No problem, I will simply create a custom control. WinRT TextBlock is sealed (ouch 3)
Found myself writing a User Control 😞
On a positive side, it work.. on a negative I need to do a lot of cleanups before this worth a PR
Hey! I worked on this for a bit too, actually, during a hackathon! I ended up binding the content of a Border to a property that produces a TextBlock itself with its own inline runs constructed at runtime.
I’ve been meaning to put it up for review, but I can hold off so we don’t have conflicting changes.
Dustin L. Howett (@DHowett) - I kinda enjoyed 😄 . In any case please let me know if you believe it is something I should continue to productize - since if you have a working solution than probably we can skip mine.
BTW, I am not complaining and not regretting anything, but consider removing "help wanted" - I've seen some additional items, that were marked as "help wanted" but were at different stages of implementation.
That’s a very good call (about not keeping the help tag on things we start working on). I expect your solution is better than mine—after all, mine was little more than a hack—so I’d love to see you finish it. A label that can highlight specific ranges is a very useful general-purpose UserControl.
Dustin L. Howett (@DHowett) - from what I've learnt observing this community is that your "hacks" are much better than the best contribution I can do! 😄 In any case will continue to productize it during this week (it is in a bad shape, as I didn't work with neither C++, nor XAML in the last 8 years).
Activity
DHowett commentedon Jun 23, 2020
If we're using TextBlocks we can just fill them with
Runs generated at runtime 😄DHowett commentedon Jun 23, 2020
zadjii-msft commentedon Jun 23, 2020
Yes, that's easy enough, but then we need to hook up a lot more XAML - the Palette knows which characters need to be highlighted, so it would need to set that on each of the commands in the match list, then each of those guys would need to return a
Runinstead of just astring.It's not impossible, but it's a lot more XAML binding than anything I've done
DHowett commentedon Jun 25, 2020
Mind if I bump this one into 2.0? If you don't get to it, I'd like to. 😄
4 remaining items
Don-Vito commentedon Oct 19, 2020
Dustin L. Howett (@DHowett), Mike Griese (@zadjii-msft) - so this was planned to be a nice warmup exercise for Saturday morning. This was a bad decision 😄.. aka how to ruin a half of your weekend..
On a positive side, it work.. on a negative I need to do a lot of cleanups before this worth a PR

DHowett commentedon Oct 19, 2020
Hey! I worked on this for a bit too, actually, during a hackathon! I ended up binding the content of a Border to a property that produces a TextBlock itself with its own inline runs constructed at runtime.
I’ve been meaning to put it up for review, but I can hold off so we don’t have conflicting changes.
Thanks for working on this!
Don-Vito commentedon Oct 19, 2020
Dustin L. Howett (@DHowett) - I kinda enjoyed 😄 . In any case please let me know if you believe it is something I should continue to productize - since if you have a working solution than probably we can skip mine.
BTW, I am not complaining and not regretting anything, but consider removing "help wanted" - I've seen some additional items, that were marked as "help wanted" but were at different stages of implementation.
DHowett commentedon Oct 19, 2020
That’s a very good call (about not keeping the help tag on things we start working on). I expect your solution is better than mine—after all, mine was little more than a hack—so I’d love to see you finish it. A label that can highlight specific ranges is a very useful general-purpose UserControl.
Don-Vito commentedon Oct 19, 2020
Dustin L. Howett (@DHowett) - from what I've learnt observing this community is that your "hacks" are much better than the best contribution I can do! 😄 In any case will continue to productize it during this week (it is in a bad shape, as I didn't work with neither C++, nor XAML in the last 8 years).
zadjii-msft commentedon Oct 19, 2020
Don-Vito I love it! Looking forward to the PR☺️
Bold matching text in the command palette (microsoft#7977)