Пример #1
0
        public string GetDisplayTextFromGroup(object cell)
        {
            int groupIndex = TemplatedItems.GetGlobalIndexOfGroup(cell);

            if (groupIndex == -1)
            {
                return(cell.ToString());
            }

            var group = TemplatedItems.GetGroup(groupIndex);

            string displayBinding = null;

            if (GroupDisplayBinding != null)
            {
                displayBinding = group.Name;
            }

            if (GroupShortNameBinding != null)
            {
                displayBinding = group.ShortName;
            }

            // TODO: what if they set both? should it default to the ShortName, like it will here?
            // ShortNames binding did not appear to be functional before.
            return(displayBinding);
        }