Is it possible in WPF to embed a ProgressBar in the Background of a TextBox?
Yes, but there are varying levels of integration you could achieve.
The simplest way would be to host a ProgressBar
and TextBox
with see-through background in the same Grid
:
<Grid>
<ProgressBar/>
<TextBox Background="#00ffffff"/>
</Grid>
Importantly, the background color is transparent but visible to hit testing. #00000000 would not work as expected because clicking on the TextBox
would actually be clicking on the ProgressBar
.
You could also retemplate the TextBox
to incorporate the ProgressBar
more intrinsically into its template. However, this would be of limited use unless you wrote your own control while you're at it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With