【问题标题】:How can i implement scrollbar in oxyplot and still the zooming working我如何在 oxyplot 中实现滚动条并且仍然可以进行缩放
【发布时间】:2015-09-05 17:53:45
【问题描述】:

我正在尝试使用 Silverlight 中的 Oxyplot 实现宽图表。我被困在几个项目上。谁能帮帮我。

1) 如何在 Silverlight 的 Oxyplot 图表中实现水平和垂直滚动条? Objo 建议遵循覆盖示例。但更多关于这方面的信息会更有帮助。

2) 当线性轴上有很多项目时,如何禁用自动缩小项目,但缩放仍然可以工作。垂直滚动条应该有助于查看下面的项目。

【问题讨论】:

    标签: c# silverlight scrollbar oxyplot


    【解决方案1】:

    您可以修改 oxyplot 控制器以允许您使用 shift+scroll 进行缩放,而不仅仅是滚动。然后你可以使用“唯一滚动”来做其他事情:

    var customController = new PlotController();
    customController.UnbindMouseWheel();
    customController.BindMouseWheel(OxyModifierKeys.Shift,PlotCommands.ZoomWheel);
    

    然后您可以将控制器绑定到 xaml 中的绘图:

    <oxy:PlotView Controller="{Binding customController}"/>
    

    希望对你有帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-07-27
      • 2017-05-29
      • 1970-01-01
      • 2013-05-16
      • 1970-01-01
      • 2014-04-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多