小编rog*_*pnz的帖子

UserControl中的wpf绑定集合属性

我有一个自定义UserControl,其中包含自定义对象的集合.

public class Question : FrameworkElement
{
    public readonly static DependencyProperty FullNameProperty =
        DependencyProperty.Register("FullName", typeof(string), typeof(Question));

    public readonly static DependencyProperty ShortNameProperty =
        DependencyProperty.Register("ShortName", typeof(string), typeof(Question));

    public readonly static DependencyProperty RecOrderProperty =
        DependencyProperty.Register("RecOrder", typeof(int), typeof(Question));

    public readonly static DependencyProperty AnswerProperty =
        DependencyProperty.Register("Answer", typeof(string), typeof(Question));

    public string FullName
    {
        get { return (string)GetValue(FullNameProperty); }
        set { SetValue(NameProperty, value); }
    }

    public string ShortName
    {
        get { return (string)GetValue(ShortNameProperty); }
        set { SetValue(ShortNameProperty, value); }
    }

    public string Answer
    {
        get { return …
Run Code Online (Sandbox Code Playgroud)

c# wpf xaml

6
推荐指数
1
解决办法
7920
查看次数

标签 统计

c# ×1

wpf ×1

xaml ×1