TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
raul hdez
NA
1
1.7k
Call parent component from children user control
Sep 3 2014 8:53 AM
Hello, I am trying to call a combobox located in a usercontrol from another usercontrol.
Parent user control:
<ComboBox x:Name="cmbA" Width="100" SelectedIndex="0">
</ComboBox>
<DataGrid>
<DataGridTemplateColumn>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<local:ucCM />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid>
Child user control (ucCM.xaml):
I have tried with this code, but it isn't working because "this.Parent" returns null.
ComboBox cmbA = (ComboBox)((this.Parent) as UserControl).FindName("cmbA");
Reply
Answers (
1
)
Need a basic idea on building a text editor using c# and wpf
Auto Email Scheduler in WPF or C# window application