Пример #1
0
        private DataTemplate GetCellTemplate(Cell cell, SpreadsheetControl control)
        {
            double value = 0;

            double.TryParse(cell.DisplayText, NumberStyles.Float, control.Options.Culture, out value);
            string templateName = Math.Sign(value) == -1 ? "IncorrectTemplate" : "CorrectTemplate";

            return(control.TryFindResource(templateName) as DataTemplate);
        }
Пример #2
0
        private DataTemplate GetCellTemplate(DevExpress.Spreadsheet.Cell cell, SpreadsheetControl control)
        {
            string templateName = cell.HasFormula ? "FormulaTemplate" : "EmptyTemplate";

            return(control.TryFindResource(templateName) as DataTemplate);
        }