Hey guys,
I know that this is a general question but it is driving me crazy! I'm working on an application that includes WPF forms and what I want to do is to be able to click on a control (in this case RichTextBoxes and Images) and use the mouse to move and resize the control. What I would like to be able to do is to have a generic 'Friends WithEvents Focus_Control as Control' and then assign the Image or the RTB that is clicked to Focus_Control and work with Focus_Control for the other commands. The problem that I'm running into is that when I try to assign an Image to the Focus_Control I get a message that an Image cannot be converted to a System.Windows.Controls.Control. Why is that? They are both System.Windows.Controls. They both have all the commands that I need as all I want to do is move the Margin to change location or Height/Width to change the size. Can someone tell me why this doesn't work and if there is a way to accomplish what I'm trying to do. If they can't work off the same variable then I can just write the duplicate code to handle the two control types but I'd like to understand the difference. Thanks in advance guys!
BTW I'm only asking about the Image as control issue. I've already got everything I need on the movement and resizing issue.