I have a comboxbox defined like this (basically):
<ComboBox x:Name="pageViewSize">
<ComboBox.Items>
<ComboBoxItem IsSelected="True">5</ComboBoxItem>
<ComboBoxItem>10</ComboBoxItem>
<ComboBoxItem>20</ComboBoxItem>
<ComboBoxItem>30</ComboBoxItem>
<ComboBoxItem>50</ComboBoxItem>
<ComboBoxItem>100</ComboBoxItem>
</ComboBox.Items>
</ComboBox>
Now i would like my DataPager's PageSize (which is the source to a DataGrid) be bound to this ComboBox's SelectedItem.Value (or is it SelectedValue?):
<DataPager PageSize="{Binding Path=SelectedItem.Value, ElementName=pageViewSize}" Source="{Binding PageView}"/>
This, unfortunately, is not working. The initial pagesize is not 10. And whenever i changed the selection in the ComboBox nothing happens to the displayed pagesize in the DataGrid.
What am i doing wrong?
Thanks