Exemplo n.º 1
0
        // Token: 0x06004895 RID: 18581 RVA: 0x00149F18 File Offset: 0x00148118
        private static object OnCoerceSortMemberPath(DependencyObject d, object baseValue)
        {
            DataGridComboBoxColumn dataGridComboBoxColumn = (DataGridComboBoxColumn)d;
            string text = (string)baseValue;

            if (string.IsNullOrEmpty(text))
            {
                string pathFromBinding = DataGridHelper.GetPathFromBinding(dataGridComboBoxColumn.EffectiveBinding as Binding);
                if (!string.IsNullOrEmpty(pathFromBinding))
                {
                    text = pathFromBinding;
                }
            }
            return(text);
        }
Exemplo n.º 2
0
        private static object OnCoerceSortMemberPath(DependencyObject d, object baseValue)
        {
            var column         = (DataGridComboBoxColumn)d;
            var sortMemberPath = (string)baseValue;

            if (string.IsNullOrEmpty(sortMemberPath))
            {
                var bindingSortMemberPath = DataGridHelper.GetPathFromBinding(column.EffectiveBinding as Binding);
                if (!string.IsNullOrEmpty(bindingSortMemberPath))
                {
                    sortMemberPath = bindingSortMemberPath;
                }
            }

            return(sortMemberPath);
        }