您的位置:首页 > 编程语言 > PHP开发

WPF DynamicDataDisplay The name “ChartPlotter” does not exist问题解决

2018-03-12 10:26 513 查看

WPF DynamicDataDisplay The name “ChartPlotter” does not exist问题解决

刚开始学DynamicDataDisplay这个库,资料还挺多的,但把库下载和添加引用好了之后,wpf使用库写了个简单的程序,在xaml界面显示不出来预览图,但运行是没有问题的额,一直提示 “命名空间”中不存在“ChartPlotter”名称。” 然后我就找资料呀,虽然能允许,但看着不舒服呀,最后重要找到了原因,是因为我们使用的库.dll文件没有被解锁,就是所谓的unlock;这个操作,在windows下可以做。https://blogs.msdn.microsoft.com/delay/p/unblockingdownloadedfile/

解锁之后重启vs就成了,如果还不行,你解锁之后把.dll文件复制到另一个文件夹,充填加一下引用就成,亲测可用。

<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApplication1"
xmlns:d3="http://research.microsoft.com/DynamicDataDisplay/1.0"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525">
<Grid>
<d3:ChartPlotter x:Name="plotter" Margin="10,10,33,10" Grid.Row="1" Background="Transparent" Foreground="#FF00DBE7">
<d3:ChartPlotter.VerticalAxis>
<d3:VerticalIntegerAxis Foreground="#FF00DBE7"/>
</d3:ChartPlotter.VerticalAxis>

<d3:ChartPlotter.HorizontalAxis >

<d3:HorizontalIntegerAxis Foreground="#FF00DBE7"/>

</d3:ChartPlotter.HorizontalAxis>

<d3:Header Content="CPU Performance History" Foreground="#FF00DBE7"/>

</d3:ChartPlotter>
</Grid>
</Window>


有问题欢迎留言。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐