locked
ListBox and SelectedIndex RRS feed

  • Question

  • Hi,

    SelectedIndex beginns with 0 but the value I bind (number of Children) is from 1 to x. Here the code:

    <ListBox SelectedIndex="{Binding Path=Children, UpdateSourceTrigger=PropertyChanged}" >

    How can I do Addition or Substraction in xaml so that the selectedIndex-Value is differen to the binded value? Something like this:

    <ListBox SelectedIndex=1+"{Binding Path=Children, UpdateSourceTrigger=PropertyChanged}" >

    Thanks in advance for a little piece of code


    Monday, August 10, 2009 3:48 PM

Answers

All replies