我试图以与在PDF文档中平移相同的方式平移ScrollViewer的内容(滚动到放大/缩小,单击+拖动以平移)ScrollViewer具有为触摸事件内置的此功能(PanningMode) ,但这似乎并没有转化为Click + Drag事件.有没有办法告诉它/模仿这个功能?
我有一个应用程序,它导出同一个类的几个对象,以及只导入特定类的插件.例如
public class Part
{
string name;
public Part(string nm)
{
name = nm;
}
}
public class Car //Exports ALL Parts of the Car
{
[Export(typeof(Part))]
public Part steeringWheel = new Part("SteeringWheel");
[Export(typeof(Part))]
public Part engine = new Part("Engine");
[Export(typeof(Part))]
public Part brakes = new Part("Brakes");
}
public class SystemMonitorPlugin //Imports only SOME Parts from the Car
{
[Import(typeof(Part))]
public Part engine;
[Import(typeof(Part))]
public Part brakes;
}
Run Code Online (Sandbox Code Playgroud)
有人可以解释我是如何实现这种行为的吗?