如何使用MVVM制作可拖动的拇指 [英] How to make Dragable thumbs using MVVM

查看:73
本文介绍了如何使用MVVM制作可拖动的拇指的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我一直在用可拖动的拇指和MVVM体系结构遇到一个主要问题.我目前是32位PIC开发板的仿真器编辑器.实际上,这使所有可以使用C#编程的人都可以与外界进行交互,例如电动机灯甚至以太网控制器等.

来源可在这里找到:

http://netduinoemulator.codeplex.com/SourceControl/list/changesets [ 每个人都设置了一个OnDragDelta事件和一个X坐标来记录其当前位置.

设备全部保存在设备"子文件夹中,并且具有相同的MVVM体系结构.

问题


我似乎在代码中丢失了OnDragDelta调用,并且不再调用它,并且我尝试找不到它的原因是否主要是由于装饰者使生活变得困难而导致的.

当将此OnDragDelta事件设置为像我们之前运行的那样正确触发时,事实证明根本无法以任何方式更改拇指的位置.

现在,我为这个问题寻找解决方案,每次发现的每种类型的解决方案,我都变得空白而失败.我已经尝试解决了3个月,我确实需要一些专家帮助.

感谢您提供的任何帮助
非常感谢...
Chris

Hi guys,

I''ve been having a major problem with drag-gable thumbs and MVVM architecture. I''m currently an editor of a emulator for a 32-bit PIC based development board. Effectively this allows all those who can program in C# to interface with the outside world i.e. motors lights and even Ethernet controllers etc.

The source is available here:

http://netduinoemulator.codeplex.com/SourceControl/list/changesets[^]

You will have to set NetduinoEmulator as the start up project to debug.

The Principle


Based on .Net Micro framework we have a list of available components that can be simulated, these can be attached or configured to operate of an output port of the device. Now these devices are held within an adorner and placed on a canvas within a listbox. They are generated as a custom thumb who''s properties are set up in a sub folder "Controls".
Each one has an OnDragDelta Event set up and an X Y coordinate to record it''s current position.

The devices are all held within a sub folder "Devices" and have the same MVVM architecture.

The Problem


I seem to have lost the OnDragDelta call in my code and it''s no longer called and as much as I try I can''t find were it''s missing mainly due to the adorner making life difficult.

When this OnDragDelta event is set up to fire properly as we did have it running previously it simply proves impossible to change the position the thumb any way I try.

Now I''ve goggled for a solution for this problem and I''ve come up blank and failed each time for each type of solution I''ve found. I''ve been trying to solve this for 3 months now and I really need some expert help.

Any help you can provide will be gratefully appreciated
Many Many Thanks
Chris

推荐答案

使用相关项目正确地打包您的解决方案-我将再次对其进行研究.

哦-并在u处清除病毒
repackage your solution properly with dependent projects - and i''ll look at it again.

oh - and remove the virus while u at it


这篇关于如何使用MVVM制作可拖动的拇指的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆