小编Bio*_*der的帖子

绑定时未实现错误的方法或操作

我目前正在开发一个Visual Studio插件(VSPackage),它最终应该能够可视化调用关系.为了表示它们,我想使用管理图形的Graph#库(避免重叠边缘等).不幸的是,我在运行时在我的XAML中收到以下错误消息:

XamlParseException:未实现方法或操作.

<graph:CallRelationGraphLayout Graph="{Binding RelationGraph}"/>标签上会弹出错误.

<UserControl x:Class="Biocoder.InteractiveExploration.View.ExplorationControl"
         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
         xmlns:graphsharp="clr-namespace:GraphSharp.Controls;assembly=GraphSharp.Controls"
         xmlns:zoom="clr-namespace:WPFExtensions.Controls;assembly=WPFExtensions"
         xmlns:graph="clr-namespace:Biocoder.InteractiveExploration.Graph"
         xmlns:viewmodels="clr-namespace:Biocoder.InteractiveExploration.ViewModel"
         xmlns:controls="clr-namespace:Biocoder.InteractiveExploration.Controls" mc:Ignorable="d" 
         d:DesignHeight="300" d:DesignWidth="300">



<UserControl.DataContext>
    <viewmodels:ExplorationToolViewModel/>
</UserControl.DataContext>

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="*"/>
        <RowDefinition Height="Auto"/>
    </Grid.RowDefinitions>

    <zoom:ZoomControl Grid.Row="1"
                      Zoom="0.2"
                      ZoomBoxOpacity="0.5"
                      Background="Yellow">

        <graph:CallRelationGraphLayout Graph="{Binding RelationGraph}"/>

    </zoom:ZoomControl>

</Grid>

</UserControl>
Run Code Online (Sandbox Code Playgroud)

我还创建了自己的顶点,边和图布局类.我的图最终应该表示方法(顶点)之间的调用关系(边).

MethodVertex.cs

public class MethodVertex
{
    public string ID { get; private set; }
    public bool IsMale { get; private set; }

    public MethodVertex(string id, bool isMale)
    {
        ID = id;
        IsMale = isMale;
    }

    public …
Run Code Online (Sandbox Code Playgroud)

data-binding wpf visual-studio-2010 vspackage graph-sharp

7
推荐指数
1
解决办法
4319
查看次数