Apr 26
Keith | Dev, C#, WPF
I was re-templating the AutoCompleteBox control from the Feb 2010 WPF toolkit tonight (using in Blend 4 RC). It didn’t go so well. The values in the dropdown wouldn’t show.
I tracked it down to this annoying Border Opacity within the template part for the popup:
...
<Popup x:Name="Popup">
<Grid Background="{TemplateBinding Background}" Opacity="{TemplateBinding Opacity}">
<Border x:Name="PopupBorder" BorderThickness="0" Background="#11000000" HorizontalAlignment="Stretch" Opacity="0">
...
The bit to note is the hardcoded Opacity=”0”. Remove that and its fine:
Just one of those simple but annoying bugs that gets in the way of a seemly simple task. I reported it on the WPF Toolkit forums.
Oh yeah, and don’t drag the window when the dropdown is open LOL:
(note the AutoCompleteBox control is in the preview band, so we cant complain too much!)