wpf - ToggleButton group: Ensuring one item is always selected in a ListBox -


I'm trying to duplicate the left / center / right alignment toolbar buttons in Word when you press the "Left Alignment" Click on center and right button are unchecked. I am using a WPF ListBox with togglebutton.

The problem is that users can click the left alignment button twice. The second click is to unselect the button and sets the underlying value to zero. I have to do a second to do nothing.

Thoughts? Always emphasize the list box for a selected item? Stop the empty in the visual model (need to refresh togglebinding binding)?

  & lt; List Box Itemsource = "{x: Static Domain: FieldElement.AL}" SelectedValue = "{Binding Focused FieldAlignment}" & gt; & Lt; ListBox.ItemTemplate & gt; & Lt; DataTemplate & gt; & Lt; ToggleButton IsChecked = "{Binding relative Soros = {Reslevsource mode = SearchEnster, ancestor type = {x: type list box}}, path = ishselected}" & gt; & Lt; Text block text = "{binding description}" /> & Lt; / ToggleButton & gt; & Lt; / DataTemplate & gt; & Lt; /ListBox.ItemTemplate> & Lt; / ListBox & gt;  

Yes, I would prefer radiation for this case, but if you want to Use the toggle button, it is possible that you can force the ischeabled property to bind, when it is checked,


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -