Change LongListSelector's SelectedItem's ItemTemplate [closed] - windows-phone-8

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I'm new to Windows Phone and writing an application that uses LongListSelector with group to display data. What I can't implement is, I'm trying to change LongListSelector's ItemTemplate from code by selecting an item of LLS. I tried lots of things but I think they're all for loading, I cannot change an item's template.
What should I use to change an item's template of LLS by selecting it?

Sorry for the late reply, I must have missed a notification.
So, my second suggestion still won't work. It's only for static templates, meaning once your Items DataTemplate is loaded, there's no way to change them.
What you can do though, is have the XAML of your normal and selected templates in a style and tweek their visibility based on VisualState. I've edited the sample disklosr posted to illustrate what I mean, notice how the StoryBoard of the CustomUserControl changes the visibility of the NormalGrid and SelectedGrid. You can have any layout you wish inside those two grid's bound to your dataItems.
Sample

Related

What is this <lt-mirror> html tag? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed last year.
Improve this question
To make the question short, I was playing with the dom, I created a text-area and noticed that an element tagged lt-mirror was generated whenever the user type something. The new element is placed just before the text-area. Couldn't find any documentation about it across the web ?
The lt-mirror tag was generated by an extension called LanguageTool, which target the text-areas and check for writing errors.
Did some research about this and found something! Okay, so the person who wrote this probably did something called custom elements. Rather than having nested, verbose elements for a page feature, you could use a custom element to make it more comprehensive and most importantly reusable!
You can create a custom element made with your classes, own methods, and properties, etc, and use it with the built-in HTML elements.
You can find more info on it here:
https://javascript.info/custom-elements
https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements
https://developers.google.com/web/fundamentals/web-components/customelements
I guess it's some kind of a custom element.

Solving CSS compatibility [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
I decided to use nvd3 library and downloaded the both required js libraries files and the CSS needed.
I placed the <svg/> somewhere at my html document. But all I'm getting is an ugly representation of chart:
I'm using some CSS templates I found around. And these are the ones messing the correct rendering.
I generated a new simpler html document with any css but the one form library. And all goes on ok:
I tried placing the svg tag inside another div but got not results.
How could I fix this?
Clearly the CSS template(s) you are using are not appropriate for the type of chart you are trying to render. It is setting the fill property on what is a line-only chart.
I am not familiar with nvd3 so this is only a generic answer I am afraid. You probably need to select a fifferent template that is applicable to line graphs. The one you are using was probably intended for other types of graphs such as bar or pie charts.

Disable or hide fields that are not applicable [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
These are more of user interface design questions
Sometimes fields on an HTML form may not be applicable for a particular criteria (say based on the selection of an item from a pulldown menu). In such a situation, is it better to hide the field or to simple disable/gray it out? One thing I see in that is: HTML hiding fields may affect the layout of the page or have extra white space (if visibility is set to hidden)
When a form is being submitted, is it better (in general) to present a confirmation page before the user commits the information? Is there a a standard for design of this?
I believe it's better to hide the element, to remove possible confusion and to make the page cleaner. If you use display: none, instead of visibility: hidden, it will remove the extra whitespace.
I don't think it's necessary to have a confirmation page, unless there's payment involved.

how to create a quiz using HTML5 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I know this is slightly broad question but I'm looking to build a quiz similar to http://net.tutsplus.com/articles/quizzes/nettuts-quiz-6-how-well-do-you-know-html5/ but also with with drag and drop capabilities but unsure of where to start looking.
Any ideas?
Thanks
You can investigate the tutsplus quiz using Developer Tools in Google Chrome or FireBug in Firefox.
Some idea on how it is done :
Taking number of questions as : 10.
Quiz contains different slides.
So we have
Welcome slide
10 slides (one slide for each question)
Results slide
Each question slide will have
a Question
four Options
Next button
We will show only one slide at any time.
On start - We will show only the first Welcome slide and hide all other slides.
Whenever we click on Start (Welcome Slide) or Next (Questions slide) or Finish (Last slide), it will just hide the current slide and show the next slide.
Whenever we click on any answer, we will add a class to it.
In the Results slide, we check these selected items against the answers and calculate the result.
Before-hand we need all the questions, options and their correct answers.
This is how tutsplus quiz is implemented using
HTML
CSS
JavaScript/jQuery
Regarding the Drag and Drop, we can use jQuery UI Draggable, jQuery UI Droppable and Sortable depending upon your requirement.
You can use many other ways to implement what you need and also some back-end technologies for more questions and sets.

<select> drop-down doesn't expand [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I've got a strange Problem, but first some description:
First there is a TreeTable - View. In each row, there is a drop-down menu in 1 column.
The drop-down is realized via HTML tag. And here is my problem:
If I click with a normal click on the expand button nothing happens.
If I click with an right click, than the menu will expand. Afterwards it works with a normal left click, too.
So I think the reason for this problem are the event listeners of the TreeTable. So I already added an if-condition and added some logging. The click is always logged, but the drop-down is still react like I've described above.
I thought i could call the expand() Method, but as far as I know, there isn't any way to toggle the expand a drop-down, without using jQuery. (NOTE: Refactoring the size isn't a good solution)
So I'm at the end of my knowledge, maybe one of you knows an solution. Thank You.
I've got an solution: at my listener I added this: target.focus(); target.click(); (target is the -Element) Now it works fine. Might I'm adding an if-condition...