Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
145
Combo box defaut text
posted

Hi

I'm trying to add some default text to combo boxes that will show when there is no item selected.  I'm using a style to acheive this which works great when the combo is first loaded.


<Style TargetType="{x:Type igRibbon:ComboEditorTool}" x:Key="PleaseSelect">
<Style.Triggers>
<Trigger Property="SelectedIndex" Value="-1">
<Setter Property="Text" Value="Please Select" />
</Trigger>
</Style.Triggers>
</Style>

But when the combo's selected item is reset (by setting it to null) it fails to display the default text, what could be the reason for this? Is there a better way to reset the selected item?

I've attached an example project which demonstrates the issue, once an item has been chosen, press the reset button, it will clear the item but not show the "Please Select" text.

I'm using version 10.1.20101.2004 of the controls, incase anything has changed.

Any help would be appreciated.
Chris

 

 

 

ComboBoxLoadTest.zip
Parents Reply Children