I have a lightswitch project in which I have a custom ModalWindow that should create a new record and set its "nomBrut" (basically its name) property to a string value that the user creates with the help of various TextBoxes and CheckBoxes.
Here is an example of what it looks like right now:
http://puu.sh/kKbNz/2a04f2bede.png[
^]
Here is the code for the TextBlock that displays what the name of the record should be:
<TextBlock x:Name="textBlock" HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Top" Margin="36,239,0,0">
<Run Text="{Binding Text, ElementName=AutoCompleteModele}"/>
<Run Text="{Binding Text, Converter={StaticResource DataConverter}, ElementName=AutoCompleteInsertion1}"/>
<Run Text="{Binding Text, Converter={StaticResource DataConverter}, ElementName=AutoCompleteInsertion2}"/>
<Run Text="{Binding Text, Converter={StaticResource DataConverter}, ElementName=AutoCompleteInsertion3}"/>
<Run Text="{lib:MultiBinding Converter={StaticResource CheckConverter}, Source1={Binding IsChecked, ElementName=checkEL, ValidatesOnExceptions=true},
Source2={Binding Content, ElementName=checkEL, ValidatesOnExceptions=true}}"/>
<Run Text="{lib:MultiBinding Converter={StaticResource CheckConverter}, Source1={Binding IsChecked, ElementName=checkDX, ValidatesOnExceptions=true},
Source2={Binding Content, ElementName=checkDX, ValidatesOnExceptions=true}}"/>
<Run Text="{lib:MultiBinding Converter={StaticResource CheckConverter}, Source1={Binding IsChecked, ElementName=checkCW, ValidatesOnExceptions=true},
Source2={Binding Content, ElementName=checkCW, ValidatesOnExceptions=true}}"/>
<Run Text="{lib:MultiBinding Converter={StaticResource CheckConverter}, Source1={Binding IsChecked, ElementName=checkHW, ValidatesOnExceptions=true},
Source2={Binding Content, ElementName=checkHW, ValidatesOnExceptions=true}}"/>
<Run Text="{lib:MultiBinding Converter={StaticResource CheckConverter}, Source1={Binding IsChecked, ElementName=checkVP, ValidatesOnExceptions=true},
Source2={Binding Content, ElementName=checkVP, ValidatesOnExceptions=true}}"/>
</TextBlock>
Now my question is how do I bind that full name to the "nomBrut" property of the record that is created when I open my custom modal window ?
Something like binding the whole text from the InlineCollection of the TextBlock with TwoWay mode to the Screen.Product.SelectedItem "nomBrut" field ?