Goal:
The input data that is located inside of the textbox(usercontrol_menu.xaml) shall be transferred and then to be used and displayed in the label inside of usercontrol_number1.xaml. The transportation of the input data will be executed when you have pressed the button "enter" or clicked on the button "Send" inside of usercontrol_menu.xaml.
Problem:
Do you have a concrete example combined on my source code in order to achieve the goal?
Information:
- MainWindows.xaml is located in a separated project.
http://bit.ly/1ockD7L
XAML
-- MainWindow.xaml
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:usercontrol_menu="clr-namespace:usercontrol_menu;assembly=usercontrol_menu" xmlns:usercontrol_number1="clr-namespace:usercontrol_number1;assembly=usercontrol_number1" x:Class="MainWindows.MainWindow"
Title="MainWindow" Height="350" Width="525">
<Grid>
<usercontrol_menu:UserControl1 HorizontalAlignment="Left" VerticalAlignment="Top" Height="124" Width="434" Margin="24,28,0,0"/>
<usercontrol_number1:UserControl1 HorizontalAlignment="Left" Margin="24,176,0,0" VerticalAlignment="Top" Height="115" Width="434"/>
</Grid>
</Window>
-- usercontrol_menu UserControl1.xaml
<UserControl x:Class="usercontrol_menu.UserControl1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid removed="#FFF3CBCB">
<Button x:Name="btn_send" Content="Send" HorizontalAlignment="Left" Margin="99,100,0,0" VerticalAlignment="Top" Width="75"/>
<TextBox x:Name="txt_input" HorizontalAlignment="Left" Height="23" Margin="54,57,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="120"/>
</Grid>
</UserControl>
-- usercontrol_number1 UserControl1.xaml
<UserControl x:Class="usercontrol_number1.UserControl1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid removed="#FFFF9D9D">
<Label x:Name="lbl_text" Content="Text" HorizontalAlignment="Left" Margin="31,44,0,0" VerticalAlignment="Top"/>
</Grid>
</UserControl>