Cheers for your response. As I said I'm fairly new to this and I wasn't aware this was an option. I don't suppose you have a link to any good resources/tutorials on doing this so that I can read up on it?
paul_b 0
Posts
-
Adding extra parameters to events -
Adding extra parameters to eventsI'm fairly new to coding and was just trying to bodge it together quickly before figuring out the proper way to do it haha. Might sound a bit silly but it's the way I learn best. Thanks for your help I'll give that a go :)
-
Adding extra parameters to eventsI'll add a bit more of the code. The compositetransform is created along with one of the xaml components.
public void NewButton_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
{Canvas newcanvas = new Canvas();
CompositeTransform mv = new CompositeTransform();
AppGrid.Children.Add(newcanvas);Ellipse Holder = new Ellipse();
Holder.ManipulationDelta += new ManipulationDeltaEventHandler(HolderManipulationDelta);}
private void HolderManipulationDelta(object sender, Windows.UI.Xaml.Input.ManipulationDeltaRoutedEventArgs e){ //code here}
This code compiles, but I need to add the third parameter into the holdermanipulationdelta event, and when i do that i get the error message above.
-
Adding extra parameters to eventsBy default there is no third parameter and when i try and add one I get the error message: "No overload for 'HolderManipulationDelta' matches delegate 'Windows.UI.Xaml.Input.ManipulationDeltaEventHandler'" I'm looking for a way to add the third parameter in.
-
Adding extra parameters to eventsOkay so here's the deal. I have an event that generates a number of xaml components on the fly. One of these xaml components also has some events hooked up to it. In order to do this I am using the following line of code
Holder.ManipulationDelta += new ManipulationDeltaEventHandler(HolderManipulationDelta);
This is then handled with
private void HolderManipulationDelta(object sender, Windows.UI.Xaml.Input.ManipulationDeltaRoutedEventArgs e) {//code here }
What I need is to be able to pass in an extra parameter in the event such as...
private void HolderManipulationDelta(object sender, Windows.UI.Xaml.Input.ManipulationDeltaRoutedEventArgs e, CompositeTransform mv) {//code here }
However this seems to be invalid. I've tried googling and got some stuff on delegates etc but I cant get my head around it. Can anyone help me out?