Click here to Skip to main content
15,894,017 members
Articles / Programming Languages / C# 4.0

One Challenge in WPF Programing

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
31 Jan 2013CPOL 0  
When you create a user control, you should of course provide some interface to its functionality, how else?You can always expose some of its children, but this would violate encapsulation pretty badly, so don't do it. Instead, add internal (to be used in the same assembly) or public (to be...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
31 Jan 2013Sergey Alexandrovich Kryukov
Mmohmmad wrote:…would you show me the path to be a master in this programming language. ThanksSorry, but I don't think I can answer your question in any satisfying way.Thank you for this question, anyway. I'll try to say just few things.My education is very fundamental and not...
Please Sign up or sign in to vote.
31 Jan 2013Mmohmmad 3 alternatives  
Dear Buddies:I have three main elements in a WPF program as follow:1. a UserControl with a Button in it.2. a UserControl with a TreeView in it.3. and my MainWindow which has a grid named GridRoot.when I press the button in the 1st UserControl, one instance of UserControl with...
Please Sign up or sign in to vote.
31 Jan 2013MarkLTX
If the 1st user control is a child of the Grid, you ought to be able to get to the Grid by referencing the Parent property of the first user control. I.e. within the 1st user control class...var theGrid = this.Parent as Grid;Or, you may have to reference Parent.Parent, etc.

License

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


Written By
Architect
United States United States
Physics, physical and quantum optics, mathematics, computer science, control systems for manufacturing, diagnostics, testing, and research, theory of music, musical instruments… Contact me: https://www.SAKryukov.org

Comments and Discussions