Click here to Skip to main content
15,888,157 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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:
XML
<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 ?
Posted
Updated 14-Oct-15 8:39am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900