I'm trying to create a user control which will have a label and XamMultiColumnComboEditor. However the issue I'm running into is exposing XamMultiColumnComboEditor.Columns so programmers can specify which columns to show and hide. Is there a way to do that? It didn't like using this:
public ComboColumnCollection Columns { get { return (ComboColumnCollection)GetValue(ColumnsProperty); } set { SetValue(ColumnsProperty, value); } }
public static readonly DependencyProperty ColumnsProperty = DependencyProperty.Register("Columns", typeof(ComboColumnCollection), typeof(MultiColumnDropdownList), new FrameworkPropertyMetadata(null));
Hello,
I am checking if this is still an issue for you.
If you require any further assistance please do not hesitate to ask.
In my case since I'm creating a user control I have to expose those properties by binding to them. I'm binding properties to dependacy properties like below:
CustomItemsFilter="{Binding Path=CustomItemsFilter, ElementName=UserControl}"DisplayMemberPath="{Binding Path=DisplayMemberPath, ElementName=UserControl}"
...
public ItemsFilter CustomItemsFilter { get { return (ItemsFilter)GetValue(CustomItemsFilterProperty); } set { SetValue(CustomItemsFilterProperty, value); } }
public static readonly DependencyProperty CustomItemsFilterProperty = DependencyProperty.Register("CustomItemsFilter", typeof(ItemsFilter), typeof(AwrdsMultiColumnDropdownList), new FrameworkPropertyMetadata(null));
public string DisplayMemberPath { get { return (string)GetValue(DisplayMemberPathProperty); } set { SetValue(DisplayMemberPathProperty, value); } }
public static readonly DependencyProperty DisplayMemberPathProperty = DependencyProperty.Register("DisplayMemberPath", typeof(string), typeof(AwrdsMultiColumnDropdownList), new FrameworkPropertyMetadata(null));
However I can't figure out how to do this with the columns attribute.