locked
How can I add image in each grid of Grid Application? RRS feed

  • Question

  • Hi there, I'm doing research on Metro Style App

    Since I'm not used to javascript, I would like to know how can I add an image into the blank grid in Grid Application template.(The blank grid that has only monochrome color as default that should be inserted by some image).


    Actually, I wonder whether it is related to the below source code or not? (Because I wonder how can I change the properties style of backgroundColor to be image url or something)

        function getGroups() {
            var colors = ['rgba(209, 211, 212, 1)', 'rgba(147, 149, 152, 1)', 'rgba(65, 64, 66, 1)'];
            var groups = [];
    
            for (var i = 0; i < 6; i++) {
                var even = (i % 2) === 0;
                groups.push({
                    key: 'group' + i,
                    title: 'Collection Title Test' + i,
                    backgroundColor: colors[i % colors.length],
                    label: 'Test',
                    description: even ? 'something here.',
                    fullDescription: 'somefull description here).')
                });
            }
    
            return groups;
        }



    Thanks



    Tuesday, February 21, 2012 7:30 AM

Answers

All replies