WPF application won't execute when i add simple event -
I have a window in which I have many controls, user control generated from other controls (and grid and frames) or Control.
This works fine if I do not add any event to any of the controls in my window (in XAML). I have many other incidents which are not the reasons, but if I add a new event it will be crashing.
Example:
This is the control that I would like to include in my event:
& lt; Con: MyControl Content = "Hello" grid. Column = "3" width = "90" />
So, I change it to:
& lt; Con: MyControl content = "Hello" grid Column = "3" width = "90" = "Hello_Click" />
The application is compiled ...
But then, it happens:
'Set the connection to throw an exception.' Line number '53' and line position '22'.
Inner expansion:
{"MyWrite.Controls.Button 'to' MyNamespace.MyClass' Unable to type object to type MyControl. "}
If I now
click =" Hello_Click "
Delete, it works perfectly well!
I agree with Anurag if my customer is in another place, MyControl is hosting You can attach the button by clicking the button "Control" and clicking on the "Hello_Click" button. Click = "Hello_Click" but you will need a button below the logical hierarchy so its event can bubble into your control. The error indicates that the MyControl sub-category button is not.
Comments
Post a Comment