Question: I have the following array of strings:

```
var words = new List<string> { "Win", "Care", "q10", "Mon", "Tue", "Wed", "Thur", "Fri", "Sat", "Sun" };

```

I want to get all combinations from the array (use all words in each combination)

e.g. 

1. WinCareq10MonTueWedThurFriSatSun
2. Monq10TueWedThurFriSatSunWinCare
3. CareSunMonWinTueWedThurFriSatq10
4. SunMonq10TueCareWedThurWinFriSat

**NOTE : In every combination, all words from list of string must be used.**

Answer: 
The problem is that you have **multiple DataContexts** and by default **Binding** works with the **DataContext** of current element if it is specified, and datacontext of parent if not(and so on).

so there is 2 simple solutions:

* specify **DataContext** of element directly(only if that element does not have one)
* use **ElementName** (if you have access in *xaml* to specific element and it must be named properly through *Name* or *x:Name*), or **RelativeSource**(if you bind to some *ancestor*) inside **Binding** with **Path**
Just set properly DataContext.
For example in grid

```
<Grid.DataContext>
  <viewmodel:YourViewModel />
</Grid.DataContext>

```

And now you can bind it

```
<ItemsControl ItemsSource="{Binding Model.ButtonsRaw1}">

```

There we bind ItemsSource from our model.

Or you have an alternative way to do it from Resource. SOmething like this

```
<UserControl.Resources>
        <Style TargetType="local:YourType">
            <Setter Property="Text" Value="{Binding Path=DataContext.Model.Text, Mode=TwoWay,ElementName=YourGridName}"/>
        </Style>
</UserControl.Resources>

```