tags:

views:

41

answers:

0

Hi,

I'm working on a wpf c# app, I have a combobox which is binded to an xml value of a selected item of a list box. Here is the code for the combobox:

            <ComboBox Margin="164.301,268.036,8,0" VerticalAlignment="Top" ToolTip="Cue trigger" DataContext="{Binding SelectedItem, ElementName=listBox_Copy}" SelectedValue="{Binding XPath=Type}" Style="{DynamicResource CUE_StyleCombo}" SelectedValuePath="Content" SelectionChanged="Save">
                <ComboBoxItem Content="go"/>
                <ComboBoxItem Content="follow direct"/>
                <ComboBoxItem Content="follow after"/>
            </ComboBox>

Now when starting the program, I click an item of the listbox, the value to which is the combobox is binded is set to zero! Only on this first click. How can I solve this?

Elaboration:

   // On startup :
 <Trigger>go</Trigger>

   // Clicked a random item within the listbox

     <Trigger></Trigger>