Quantcast
Channel: wpftoolkit Discussions Rss Feed
Viewing all articles
Browse latest Browse all 2157

New Post: ChildWindow - How to pass a value from a childwindow to a main form

$
0
0
Hi,
I do have a simple form where a user enters a value in a childwinow modal then when the childwindow modal is closed, I want to get the value entered by the user and populate it in the main form.
<Grid Grid.Row="1">               
            <TextBox x:Name="txtResult" 
                          Text="" BorderThickness="1" BorderBrush="Black" 
                          Height="20" Margin="10"/>
        </Grid>

        <Border Grid.Row="1">
            <xctk:WindowContainer Background="Transparent" 
                                    ModalBackgroundBrush="#80000000">
                <xctk:ChildWindow x:Name="_childWindow"
                                  WindowBackground="#9A9999"
                                  Caption="Modal ChildWindow"
                                  IsModal="True"
                                  Left="75"
                                  Top="50"
                                  Width="275"
                                  Height="125"
                                  WindowState="Open">
                    <TextBox x:Name="txtUserInput" 
                                   Text="" 
                                   BorderThickness="1" 
                                   BorderBrush="Black" 
                                   Height="20" Margin="10"/>
                </xctk:ChildWindow>
            </xctk:WindowContainer>
        </Border>
Based on above codes, I want to get a value from txtUserInput and populate it in txtResult. Please advise.

Thanks,
Brew

Viewing all articles
Browse latest Browse all 2157

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>