0

Just so you know, i am total newbie of WPF.

So, currently, i have created two project, which are, the MyProject that contain the MainWindow and the other one is a Usercontrol project: MyUserControl that holds my UCGridView.

I have referred MyUControl to MyProject (MyProject refer MyUControl), and then i tried to create the following inside the MainWindow:

  Dim uc As New MyUserControl.UCGridView()

What i am trying to achieve is to access the GridView (x:Name="myGridView") inside UCGridView by using the code. Maybe by using something like this:

  uc.myGridView...

Is it possible guys? if possible, then i will really appreciate answers from you all. Thank you for your time.

  • Yes it is possible, just try it out. – har07 Mar 20 '14 at 09:22
  • If you're new to WPF, then you might as well start off using it correctly and *not* as you are currently doing. We don't generally create UI objects from code... this is *not* WinForms. Please see the [Walkthrough: Getting Started with WPF](http://msdn.microsoft.com/en-us/library/ms752299(v=vs.110).aspx) page on MSDN to see how things are *really* done in WPF. – Sheridan Mar 20 '14 at 09:26
  • Thank you for the response har07. The thing is it doesn't come out. When i typed 'uc.' the myGridView never show up as one of the option. It just said Identified Expected. – StudyProgramming Mar 20 '14 at 09:26
  • Thank you for the link Sheridan. Will do. – StudyProgramming Mar 20 '14 at 09:29
  • you have to use clr-namespace mapping in WPF. – voddy Mar 20 '14 at 09:42

0 Answers0