I have a control,where is combox. I bind to it properties from modelview. I can bind properties to textboxes, but not to combobox. Value from modelview is 4. Anyone know why is that ?
<ComboBox HorizontalAlignment="Left" VerticalAlignment="Top" SelectedItem="{Binding Path=QuantityOfStars}">
<ComboBoxItem Content="0"></ComboBoxItem>
<ComboBoxItem Content="1"></ComboBoxItem>
<ComboBoxItem Content="2"></ComboBoxItem>
<ComboBoxItem Content="3"></ComboBoxItem>
<ComboBoxItem Content="4"></ComboBoxItem>
<ComboBoxItem Content="5"></ComboBoxItem>
</ComboBox>
public int QuantityOfStars
{
get
{
return this.ReporterHotelDescription.QuantityOfStars;
}
set
{
this.ReporterHotelDescription.QuantityOfStars = value;
NotifyChanged("QuantityOfStars");
}
}