0

知りたい人のために説明すると、これは自己安定化アルゴリズムのツールのコンテキストにあります。

次のように定義されたいくつかのクラス 、、AlgorithmRulePredicateがあるとします。ActionGraphNode

using System;
using System.Collections.Generic;
using System.Text;

namespace SMP {
    class Algorithm {
        public List<Rule> Rules { get; set; }

        public Algorithm() {
            Rules = new List<Rule>();
        }
    }

    class Rule {
        public Predicate Predicate { get; set; }
        public Action Action { get; set; }
    }

    class Predicate {
        public string Description { get; set; }
        public string Name { get; set; }
        public string Expression { get; set; }
    }

    class Action {
        public string Description { get; set; }
        public string Name { get; set; }
        public string Expression { get; set; }
    }
}

一部の要素ごとにとListViewを表示する 2 列を接続したいと思います。Predicate.NameAction.NameAlgorithm.Rules

この投稿で使用している次の変数名に注意してください。

ListView algorithm_view;
Algorithm algorithm

を使用してインスタンスDataContextにを設定する必要があることはわかっていますが、このようなコレクションのバインドを XAML で表現する方法がわかりません。algorithm_viewAlgorithmalgorithm_view.DataContext = algorithm

イメージしやすいように、インターフェースのスクリーンショットを次に示します。

ここに画像の説明を入力

4

1 に答える 1