M
M
mche2014-09-26 10:11:44
Windows phone
mche, 2014-09-26 10:11:44

Is it possible to design a GridView like the start screen of a Windows 8.1 phone?

I would like to implement in my application the same grid as on the start screen of the phone - transparent tiles with icons, and under them a background image. At the same time, only the tiles have transparency, and all the indents and the rest of the space are opaque.
In general, it is interesting whether this is possible in principle by means of markup in xaml?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Kalibrov, 2016-10-04
@Parfenctr

Your code is most likely executed even before the DOM is loaded, try to move the script into a function and call it on the DOMContentLoaded event

function ready() {
  var blockIds = [];
  var blocks = document.querySelectorAll('[data-box-id] a');
  blocks.forEach(block => block.addEventListener('click', e => {
  blockIds.push(e.target.parentNode.getAttribute('data-box-id'));
  e.target.parentNode.style.display = 'none';
  localStorage.setItem('blocks', JSON.stringify(blockIds));
    console.log(localStorage.getItem('blocks'));
  }))
}
document.addEventListener("DOMContentLoaded", ready());

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question