Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1285
XamComboEditor issue with Binding
posted

Hi,

I am using XamComboEditor(Infragistics.Controls.Editors.XamComboEditor).
And I tried to Bind with ItemsSource property of XamComboEditor with MyProperty which is type of ObservableCollection<string>.

The codebehind info:

public partial class Window11 : Window
{
public ObservableCollection<string> myProperty;

public ObservableCollection<string> MyProperty
{
get
{
return myProperty;
}

set
{
myProperty = value;
}
}

public Window11()
{
InitializeComponent();
Load();
}

public void Load()
{
myProperty = new ObservableCollection<string>();
LoadXamCombo();
xam.DataContext = MyProperty;
}

public void LoadXamCombo()
{
MyProperty.Add("Active");
MyProperty.Add("InActive");
}
}

Xaml Code:
<ig:XamComboEditor ItemsSource="{Binding Path=MyProperty,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=Window}}" CheckBoxVisibility="Visible" AllowMultipleSelection="False" Name="xam" Height="10" />

When I tried to expand the control , I observed as instead of Active & InActive values, 6 and 8.

I am attaching the screenshot as an attachment.

Could you please help, where i did mistake and How to get the values in XamcomboEditor "Active" & "InActive"

Thanks in advance..

Regards,
Chandra

Parents Reply Children
No Data