My project involves a panorama page with a panorama item. In that panorama item is a listbox containing a stackpanel of buttons. When each button is clicked, it opens up a new page with info pertaining to that button they clicked on.
Now my question is this -- I have about 100 unique buttons in this listbox stackpanel.
Do I have to go through and create 100 pages for these buttons? I am concerned that this might tax on the application size, but wanted to know if there was a way where I can only use 1 page, and all the buttons reference that page, but depending on the button they click that one page will be populated with the specific information.
Is this doable, and if so, could I be pointed in the direction of a tutorial for it or someone very nicely provide some code to accomplish this?
Sincerely,
Tom
Create an instance of PanoramaItem and add it to the Items collection of your Panorama object.
Since you will need to refer to your Panorama object in code, you should give it a name. (You don't have to, but that's the least mucking about.)
How you get content into this PanoramaItem is another matter for which several approaches spring to mind, but more interesting is the question of how you cause this new PanoramaItem to be the selected item. Fast forward through much debugging and heartache: you can't.
Use a Pivot control and PivotItem and you will be able to set the SelectedItem of the Pivot to the freshly minted PivotItem.
Related
I have a control to manage a FlipView (flipView) and I want synchronize SelectedIndex with a ListBox (subMenuList) to navigate between my contents. And because product owners have wonderfull requirements, I have another ListBox (shortcutList) in a control for the first item of the FlipView which is also binded to SelectedIndex of the FlipView.
Warning : some items of the lists are collapsed to simulate shortcuts to Flipview contents.
Those controls are perfectly synchronized together but the second item of FlipView :
Using mouse: on the first click, I can go to page 1 and when I flip back to shortcutList, I can not go to page 1 but I can go anywhere else. And then, when I flip back again to shortcutList, I can go to page 1 again and so on !
Using touch: I can tap go to page 1 as long as I want, I never reach my first page but I can go anywhere else.
I extract the specific part of my project to reproduce the use case on Github, that way everyone can understand what I mean.
I hope someone can tell me why UWP Flipview doesn't flip to second item ? And thanks to try to help me to find an issue.
The problem is that the item is already in selected state, so you cannot select it again - at least selecting it does not do anything as there is no selection changed event and hence the SelectedIndex binding doesn't propagate any changes. To prove it - the same thing happens if you jump to page 4, flip back to first page and click page 4 again.
How to solve this? I think you will have to use code. This XAML solution although almost works is quite fragile. The easiest solution would be to replace the ListBox in FlipContent0Control with three simple buttons and in their Click handlers navigate to the appropriate page. For an even better approach you should try to change the app to use MVVM design pattern.
I also commited a dirty fix on Github using directions of Martin Zikmund
How to solve this? I think you will have to use code. This XAML
solution although almost works is quite fragile. The easiest solution
would be to replace the ListBox in FlipContent0Control with three
simple buttons and in their Click handlers navigate to the appropriate
page.
and a tip from Jawahar
it is because your finger is still touching the control, so flipview
cannot animate. So I gave a small break after before navigating. By
the time user would have released the finger and it works !!!
in the following post.
So, three steps to resolve :
Replace SelectedIndex in FlipContent0Control with Tapped event on each ListBoxItem inner canvas.
Provide a event on tap to raise the target index to select in the FlipView.
Add a Task.Delay(100) in the method handler of event TargetedIndexChanged
I'm am not good enough in WPF, so I'd like to ask for any advice how to implement panel layout something link displayed on image below:
So, the main purpose is to display a collection of items with possibility to select a single item, which should be moved to the first position (probably with animation) and then another item template should be applied to that container (it is bigger than other items in the collection). The list doesn't have to be infinitive, so just like a simple ListBox.
For me it looks like a FlipView but with a few items, which are neighboring siblings of the selected one and are also visible in the panel's viewport.
Please, advice me how to implement such a panel, or if you have seen something suitable, please, provide a link to the source.
You need to create your custom panel using User control.
Here is one example which is similar to your requirement.
I typically use the control #Edit.Toolbar(Content, actions:"edit,new,remove,instance-list") on the items themselves. Then the user can edit the entire list from click the button on any of the items. Logically, it would make more sense for them to click the instance-list button from the ListContent
In previous versions of 2SXC, the user could hover over the DNN black and white pencil icon and click "Edit List" which made a lot of sense. This control is not available in newer versions of 2SXC so they have to edit the list by going to any of the list items.
I tried using 'instance-list' in the ListContent controls but it doesn't seem to be available there. Is there a way to give the instance-list control to the ListContent control?
I have a scenario where this is especially important. On some lists that I have, I prefer to force my user to use the Edit List to enter a list title but also edit content from the list interface rather than me putting the around every link.
The instance-list is the correct button, just ATM it doesn't offer the additional buttons. I believe others have requested it as well, we just haven't found time to implement it. You can open a new issue, but code-contributions would work even better :)
How do I display Price value($) in textbox next to a label when user checks the radio button, select one of item from listBox, and then clicks the button?
Is there way to do it on the form1.cs[Design] using the properties? Or do I need to set them up in code level?
listBox item example
EDIT: Solved this in Code-level.
I don't think you can do it without any code.
Also I'd recommend you to check out this page - just a few simple rules can make your chances to get a good answer on this site much better.
And there is not much of coding needed to solve your problem. Take a look on the Events tab in Property view in form designer. A few event handlers to process user input and some fields inside your class to store the data - I assume it is not some serious business app you're dealing with, so all the code you need for this to work would be like 20 lines tops -)
I am coding a Windows phone application. In one of my pages, I have a list picker which is populated from the database, therefore its size depends on how many records there are in the database.
My main issue is that if there are records more than a certain amount, the "extra records" are displayed behind the next control in the page and cannot be accessed.
How can I give the list picker precedence over other controls such that it is displayed in front? To give you an idea of what I want, imagine having multiple pictures in Microsoft Word and setting one picture as 'Bring to Front'.
As you can see, the entry "tommy_shaw" is greyed out. This is because it is overlapping the Transaction ID textbox. Attempting to click on "tommy_shaw" would only load up the keyboard to enter text in the Transaction ID textbox.
I believe you can fix it with grouping; which ever one you have in the code first will be displayed first. If you have two images grouped together, then it is going to try and display both of them at the sametime.
I solved it using Canvas.zIndex = 1 in the xaml file