dimanche 28 juin 2015

'System.Reflection.TargetParameterCountException' in wpf application

I keep getting that exception because of changing when I try to change the UI to my wpf application

private delegate void MyFunctionDelegate2(double t1, double t2, double t3);

    public void translate( double tx, double ty, double tz){

        Transform3DGroup transform = new Transform3DGroup();
        TranslateTransform3D t = new TranslateTransform3D(tx, ty, tz);
        transform.Children.Add(t);
        if (!Application.Current.Dispatcher.CheckAccess())
        {
            var objj = new MyFunctionDelegate2(translate);
            Application.Current.Dispatcher.BeginInvoke(objj);
        }

Aucun commentaire:

Enregistrer un commentaire