getting the parent control from a child control at runtime.
-
hi there, I have a simple WPF window with a button in it. now during runtime, i pass this button control to another function, and there, i want to know the parent of this control. ie the window, with the full namespace. any way for this thru C#
The name is Sandeep
-
hi there, I have a simple WPF window with a button in it. now during runtime, i pass this button control to another function, and there, i want to know the parent of this control. ie the window, with the full namespace. any way for this thru C#
The name is Sandeep
We have a WPF forum. The control has a parent property, to know the type, you can use the GetType method, you can also use reflection. Any method that gets passed a control, sounds a little ugly to me.
Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
-
We have a WPF forum. The control has a parent property, to know the type, you can use the GetType method, you can also use reflection. Any method that gets passed a control, sounds a little ugly to me.
Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp