protected void SetBinding(ListView listView,
                                  DefaultSerializedObjectBindingImplementation.SerializedObjectUpdateWrapper objWrapper,
                                  SerializedProperty prop)
        {
            boundObject       = objWrapper;
            boundProperty     = prop;
            boundPropertyPath = prop.propertyPath;

            m_DataList          = new SerializedObjectList(prop, true);
            m_ArraySize         = m_DataList.ArraySize;
            m_ListViewArraySize = m_DataList.ArraySize.intValue;
            this.listView       = listView;

            if (listView.makeItem == null)
            {
                listView.makeItem = () => MakeListViewItem();
            }

            if (listView.bindItem == null)
            {
                listView.bindItem = (v, i) => BindListViewItem(v, i);
            }

            listView.itemsSource = m_DataList;
        }
Пример #2
0
        protected void SetBinding(ListView listView,
                                  BindingExtensions.SerializedObjectUpdateWrapper objWrapper,
                                  SerializedProperty prop)
        {
            boundObject       = objWrapper;
            boundProperty     = prop;
            boundPropertyPath = prop.propertyPath;

            m_DataList          = new SerializedObjectList(prop, true);
            m_ArraySize         = m_DataList.ArraySize;
            m_ListViewArraySize = m_DataList.ArraySize.intValue;
            this.listView       = listView;

            if (listView.makeItem == null)
            {
                listView.makeItem = MakeListViewItem;
            }

            if (listView.bindItem == null)
            {
                listView.bindItem = BindListViewItem;
            }

            listView.itemsSource = m_DataList;
        }