How to add ZedGraph Control to Toolbox in wpf?

▼魔方 西西 提交于 2020-01-05 07:25:09

问题


I added zedgraph.dll to my wpf application. There after i add that control to my toolbox. But it is not add to my toolbox in wpf application. But it add in WinForm Application. Anybody have solution for this problem?


回答1:


  1. xmlns:zed="clr-namespace:ZedGraph;assembly=ZedGraph"

  2. Add WindowsFormsIntegration to your references

  3. Add this for example..:

    <WindowsFormsHost Name="windowsFormsHost1" Margin="500,0,0,0">
    
    <zed:ZedGraphControl x:Name="graph"
                                 Width="500"
                                 Height="320" />
    </WindowsFormsHost>
    

see http://sourceforge.net/p/zedgraph/discussion/392231/thread/86678940/



来源:https://stackoverflow.com/questions/26756000/how-to-add-zedgraph-control-to-toolbox-in-wpf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!