Answered by:
How to add more than one charm panes on setting command?

Question
-
I want to add two charm panes on setting command, I tried this way:
WinJS.Application.onsettings = function (e) { e.detail.applicationcommands = { "test1": { title: "test1", href: "/pages/charms/test1.html" } , "test2": { title: "test2", href: "/pages/charms/test2.html" }}; WinJS.UI.SettingsFlyout.populateSettings(e); }; WinJS.Application.start();
"test1" & "test2" did shown after I click setting, however, when I click "test2" , nothing is shown. Click "test1", it will show a correct page.
I could not find a sample which add more than one charm pane. Does anyone know how to add two charm panes?
And one more question, how to switch between these two charms? I mean, eg. there is a button on test1.html, after click the button, how to forward to test2.html?
- Edited by mountain2012 Monday, August 13, 2012 6:28 AM
Monday, August 13, 2012 6:27 AM
Answers
-
Hi all, I solve the first question, I am able to add two charm panges, just now, I made a mistake that test1.html and test2.html have the same div id.
Now I still want to know how to forward to test2.html from test1.html.
- Marked as answer by mountain2012 Monday, August 13, 2012 7:34 AM
Monday, August 13, 2012 7:15 AM -
Lucky! I fixed the second question as well,use this sentence, I am able to forward to other charm:
WinJS.UI.SettingsFlyout.showSettings("test2", "/pages/charms/test2.html");
- Marked as answer by mountain2012 Monday, August 13, 2012 7:34 AM
Monday, August 13, 2012 7:34 AM
All replies
-
Hi all, I solve the first question, I am able to add two charm panges, just now, I made a mistake that test1.html and test2.html have the same div id.
Now I still want to know how to forward to test2.html from test1.html.
- Marked as answer by mountain2012 Monday, August 13, 2012 7:34 AM
Monday, August 13, 2012 7:15 AM -
Lucky! I fixed the second question as well,use this sentence, I am able to forward to other charm:
WinJS.UI.SettingsFlyout.showSettings("test2", "/pages/charms/test2.html");
- Marked as answer by mountain2012 Monday, August 13, 2012 7:34 AM
Monday, August 13, 2012 7:34 AM