私はスタックパネルを持っていて、バインディングのカスタムオブジェクト "Questions"パスにdatacontextを設定しています。実行時にフレームワーク要素を追加して、textblockのプロパティをBinding()に設定すると、QuestionAnswerがオブジェクト。 QuestionTextを表示したい。クラスは抽象クラスなのでしょうか?何もSilverlightバインドの質問
public class Page
{
public int PageID { get; set; }
public ObservableCollection<QuestionAnswer> Questions { get; set; }
}
public abstract class QuestionAnswer
{
public int QuestionID { get; set; }
public string QuestionText { get; set; }
public QuestionType QuestionType { get; set; }
public Dictionary<string, string> AnswerOptions { get; set; }
public string AnswerText { get; set; }
public AnswerResponse AnswerResponse { get; set; }
}
あなたのコードバインディングを表示する – Mediator