If the Color property of the SampleDataGroup class contains a string with different colours separated by a semicolon you could use the following code to determine whether the KeywordColorList.SelectedValue property is amont these colours:
var sampleDataGroups = await SampleDataSource.GetGroupsAsync();
sampleDataGroups = sampleDataGroups.Where<SampleDataGroup>(Item => Item.Color.Split(';').Contains(KeywordColorList.SelectedValue.ToString())).ToList();
Compilable sample code:
var sampleDataGroups = new List<SampleDataGroup>
{
new SampleDataGroup { Color = "blue"},
new SampleDataGroup { Color = "blue;red;green"},
new SampleDataGroup { Color = "red;green"},
};
string selectedValue = "blue";
sampleDataGroups = sampleDataGroups.Where<SampleDataGroup>(Item => Item.Color.Split(';').Contains(selectedValue)).ToList();
Please remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question. Please don't ask several questions in the same thread.