hello guys
How can I binding a method from class to ComboBox SelectedIndex?
This is my method in a class:
public static class myClass { private static int tempComboIndex = 0; public static int ComboIndex { get { return tempComboIndex ; } set { tempComboIndex = value; } } }
And I've tried this xaml code to binding:
But its doesn't work for me.<ComboBox SelectedIndex="{Binding Path=myClass.ThemeIndex,Mode=TwoWay}">
<ComboBoxItem Content="1"/>
<ComboBoxItem Content="2"/></ComboBox>
:)