Question: Trying to find a regular expression to handle this string using PHP preg\_match\_all:

```
include='Track Ass\'y'

```

The regex should be able to handle single OR double quotes, but not break on the escaped quote. Currently the regex in place looks like this:

```
/([^ ]*?)=["|'](.*?)(["|'])/

```

This breaks on the ' and only matches up to the single quote, and misses the final y'. Help?

Answer: 
A *target* property that you want to bind something *to* should be a dependency property: <https://msdn.microsoft.com/en-us/windows/uwp/xaml-platform/custom-dependency-properties>

But what you should do here is to let the QuestionItemControl inherit the DataContext from its parent element in the ItemsControl. Just avoid setting the DataContext property of the QuestionItemControl explicitly in the ItemsControl:

```
<ItemsControl Name="Questions" Grid.Row="1" Grid.ColumnSpan="2" ItemsSource="{Binding Questions}">
    <ItemsControl.ItemTemplate>
        <DataTemplate x:DataType="model:Question">
            <uc:QuestionItemControl />
        </DataTemplate>
    </ItemsControl.ItemTemplate>
</ItemsControl>

```

...and bind directly to the Title and Answer properties in QuestionItemControl.xaml:

```
<UserControl
x:Class="Question_Answer.View.Control.QuestionItemControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Question_Answer.View.Control"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="400">

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"></ColumnDefinition>
            <ColumnDefinition Width="*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <TextBlock Grid.Column="0" Text="{Binding Title}" />
        <TextBlock Grid.Column="1" Text="{Binding Answer}" />
    </Grid>
</UserControl>

```

This should work since the DataContext of each QuestionItemControl is actually a `Question` object in the ItemsSource of the ItemsControl.
Finally i will use a collection of QuestionViewModel instead of Question. That will probably imply to synchronize the Question collection with the QuestionViewModel...