SelectedIndex is reseted
Hello, i use this control in contentPresenter
<syncfusion:SfStepProgressBar
Grid.Column="1"
VerticalAlignment="Center"
AnimationDuration="0"
ItemsSource="{Binding AllStatusesText}"
ItemsStretch="Fill"
Orientation="Horizontal"
SelectedIndex="1">
<syncfusion:SfStepProgressBar.ItemContainerStyle>
<Style TargetType="syncfusion:StepViewItem">
<Setter Property="Content" Value="{Binding ValString}" />
<Setter Property="TextSpacing" Value="8" />
<Setter Property="SecondaryContentTemplate">
<Setter.Value>
<DataTemplate />
</Setter.Value>
</Setter>
</Style>
</syncfusion:SfStepProgressBar.ItemContainerStyle>
</syncfusion:SfStepProgressBar>
First time selected item worked corectly, with animation o no. But when i switching node it stops display selected node, but steps rendered correctly.
If i bind SelectedIndex to Prop it is ride exception DoubleAnimation error
|
<syncfusion:SfStepProgressBar
x:Name="stepprogressbar"
Grid.Row="1"
Grid.Column="1"
VerticalAlignment="Center"
AnimationDuration="0"
ItemsSource="{Binding ElementName=_listView, Path=ItemsSource}"
ItemsStretch="Fill"
Orientation="Horizontal"
SelectedIndex="{Binding ElementName=_listView, Path=SelectedIndex}"> |
Hello!
Provided sample is about another thing!
DataContext change not occur. My sample is about binding to collection of objects!
ItemsSource="{Binding ElementName=_listView, Path=SelectedItem.StepViewItems}"
It is very different from provided workaround:
ItemsSource="{Binding ElementName=_listView, Path=ItemsSource}"
A want to display progress for each object on selection, NOT share single progress
|
<syncfusion:SfStepProgressBar
x:Name="stepprogressbar"
Grid.Row="1"
Grid.Column="1"
VerticalAlignment="Center"
AnimationDuration="0"
ItemsSource="{Binding StepViewItems}"
ItemsStretch="Fill"
Orientation="Horizontal"
SelectedIndex="{Binding SelectedItemIndex}">
|
|
<syncfusion:SfStepProgressBar
x:Name="stepprogressbar"
Grid.Row="1"
Grid.Column="1"
VerticalAlignment="Center"
AnimationDuration="0"
ItemsSource="{Binding ElementName=_listView, Path=ItemsSource}"
ItemsStretch="Fill"
Orientation="Horizontal"
SelectedIndex="{Binding ElementName=_listView, Path=SelectedIndex}"> |
Hello, your sample is about another things.
You soolve another problem. Look at the sample. It works, but selected index han no effect, because control does not handle DataConext changes correctly
Attachment: DataBindingToObjects_6e0319c4.zip