SelectedItem Binding OneWayToSource tries to get the property value

2 posts, 0 answers
  1. Calin Calin
    Calin Calin avatar
    59 posts
    Member since:
    Mar 2010

    Posted 26 Jul 2010 Link to this post

    Hi,

    I have a combobox in my application that has this binding on the SelectedItem

    SelectedItem="{Binding Path=Food, Mode=OneWayToSource}">

    The back end property is define as follows

    public Food Food
    {
      get { return _food; }
      set { _food = value; }
    }

    My problem is that the above binding will try to get the property, this is not the expected behavior for this type of binding.
    Can you suggest a work around you come up with fix ?

    Thank you,
  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 26 Jul 2010 Link to this post

    Hello Calin,

    As far as I can see, the same happens with the standard WPF ComboBox control, so I guess this is the expected behavior of the binding.

    Greetings,
    Valeri Hristov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top