Just starting with wpf. Trying to figure out what I did wrong.
I have the following xaml ...
<ig:XamComboEditor
Name ="cbeElementList"
SelectionChanged="cbeElementList_OnSelectionChanged"
IsEditable="False"
Height="30" Width="250"
MaxDropDownHeight="150"
Margin="52,48,215,241"/>
Its ItemsSource comes from a List of enum GetNames entries.
public static List<string> GetElmentFieldList(string elementType = "ElementType")
{
var eType = "Sunlight.Json.e" + elementType;
var myType = Type.GetType(eType);
return Enum.GetNames(myType).ToList();
}
The combo is loaded as follows…
private void LoadDataEntitiesList()
var dataEntities = SunlightFields.GetElmentFieldList("ElementType");
cbeElementList.ItemsSource = dataEntities;
cbeElementList.SelectedIndex = 0;
When the editor displays, instead of the string values (alpha, beta, gamma) being listed, their lengths are listed (5,4,5).
When I retrieve the selected item, the return string is the actual string value (alpha) …
var name = cbeElementList.SelectedItem.ToString();
The xaml namespaces are …
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ig="http://schemas.infragistics.com/xaml"
x:Class="SmartC.Wpf.MainWindow"
Title="MainWindow" Height="350" Width="525">
Trying to figure out what I have done wrong.
Thanks - Abbott
HI,
If you changed your namespace to
xmlns:igEditors="http://infragistics.com/Editors"
Those properties don't exist. There is a SelectedItemChanged Event.
Sincerely,
Matt Developer Support Engineer
When I change to using
xmlns:igWPF=http://schemas.infragistics.com/xaml/wpf
the following properties are flagged as errors ...
SelectionChanged="cbeElementFieldsList_OnSelectionChanged"
AllowMultipleSelection="True" CheckBoxVisibility="Visible"
Our shared XamComboEdtior does not supprot the binding to simple datatypes.
Here a forum post that explans that: http://ko.infragistics.com/community/forums/t/54920.aspx
Our Wpf Specific XamComboEdtior does support the binding to a collection of simple datatypes.
Matt
Developer Support Engineer
I am reviewing your issue.
Sincerely, Matt