Hi.
I'm trying to pass an Array as an argument to a constructor in xaml, like this:
I'm filling the PartNumberDataList and PartNumberDataListID - arrays with values in the xaml.cs-file.
The constructor i'm calling is in another xaml-file:
public ListViewSearching(String sqlFunction="", string EntrySearchPlaceholder="", ObservableCollection<KeyValuePair<string, string>>[] SearchList = null, ObservableCollection<KeyValuePair<string, string>>[] SearchIDlist = null) { InitializeComponent(); SqlFunction = sqlFunction; SearchDataList = (ObservableCollection<KeyValuePair<string, string>>) SearchList[0]; SearchDataIDlist = (ObservableCollection<KeyValuePair<string, string>>)SearchIDlist[0]; EntrySearch.Placeholder = EntrySearchPlaceholder; FillSearchList(); }
This will not run.
If I remove the arrays (from both xaml-file and constructor), it works fine. So the problem lies in the arrays.
Does anybody know, how to fix it?
Friendly Regards
nbs