Prevent manual control of pivot control movement - windows-phone-7

I've got a pivot control with a number of pages in it. Each page has some controls in it, for example a textbox.
I've read around and I KNOW that it's bad practice to put controls like this in a pivot but I'd really like to do it.
The application switches between pivot pages automatically but the user is able to move the pivot control manually and I don't want this. I tried to prevent user gestures by changing the pivot control's IsHitTestVisible property to false and although it stops the user changing the pivot page, it also prevents the use of the textbox inside.
Does anybody know how to prevent the user changing the pivot page, but still allow use of the controls inside?
Thanks for any help you can provide!

Silverlight for Windows Phone Toolkit has a control for this (LockablePivot).

Related

Oracle Apex Onscreen Keyboard

I want to developed restaurant management system on Oracle Apex front-end like below screenshots taken from desktop applications which was developed on .net. I just want to show my developed numeric keyboard on screen and to prevent device keyboard to be opened throughout application. I'm using oracle apex 18c. You will get my point clearly after looking into below screenshot.
You need to create the layout manually. In this case default components are not going to help you a lot, If I were you, I will try to create my own html and css and implemented into static region.
Yes, it is possible to create this layout in APEX, There is more than one approach to develop this layout.
One of the easiest approach is:
Create a static region with text fields and buttons which executes
dynamic actions on click.
If you want to display the clicked Button text, store the value in an
APEX Item and return it so that it will be displayed in the page.
Easy pease, just remember that APEX apps are responsive and things may look different in certain screens.
You can create Static Regions with button or page items and have them occupy a spefici number of columns (Column Span property). that should work for your grids.
For the inputs, instead of the template being "Floating" or "Optional Above", just change it to "Optional", which will make the labels stay on the left side. Btw, when you change it to optional it will enable a "Label Column Span" which you can use to define the size of the label.

Nativescript - Add to favorites/featured

I´m in that point on my app where i need to give the user the ability to save to favorites. To be more specific, let´s say that he´s seeing a list-view and then presses one of the listitems which takes him to the detail of that item...here i have a star icon that when pressed it should save that item and then if he navigates to the favorites page, he will see another listview with all of the favorites.
but i´m stuck on how to accomplish this, the only thing that comes to my mind is the application settings...it should be a dynamic array that always exists and then keeps adding or deleting objects(favorites).
Any thougts on this? can anyone suggest me an approach? maybe a better one?
Regards
You may use the nativescript-localstorage plugin which internally uses file system only and takes care of reading / updating JSON file as needed.

Why won't my windows form Data repeater Resize?

After searching for a few days, i thought maby someone can help me.
I'm making a Windows form Application. And on one of my views i have a repeater with a label in there. This label is dynamicly sized. But My DataRepeater item won't adjust to the size of my label.
Has anyone a idea how to fix this?
The datarepeater i use is from the visual basic powerpacks.
If any more Infromation is needed to help me, please let me know.
Regards Stephan
It looks like DataRepeater is very limited with regards to resizing. I found this website that it looks like they got it working, but all of the items resize to the same size.
http://social.msdn.microsoft.com/forums/en-US/vbpowerpacks/thread/c93579f2-8b4c-4002-9ce2-152e2dddd10e/
Edit:
This solution is a little bit more complex, but VERY flexible:
You can use a FlowLayoutPanel:
You create an User Control for the item on the list and add a Select Property to the User Control.
You add a list of the User Controls to the FlowLayoutPanel.
When the User Control change size, it automatically adjust everything in the FlowLayoutPanel. (Disable WrapContents to prevent Horizontal Scrolling)
http://msdn.microsoft.com/en-us/library/ms171633.aspx
You can use the following in the UserControl to enable Click on the User Control to select it:
Click event for .Net (Windows Forms) user control
In the form that use the FlowLayoutPanel, you add the Click event, and then apply the Select to only that one User Control.
You can use the SetBoundsControl inside the User Control to set the size of the item.

Prevent Pivot navigation in Windows Phone

I have an audio recording application for Windows Phone. It consists of a pivot control with two pivot items. One is for recording control, and another one is for reviewing and listening the recorded items.
When the recording is taking place, I need the way to prevent the user from navigating away from the current pivot item, but to retain the feel that an entire pivot item moves, but doesn't flip to the next item, as if there is none.
I know I could use GestureListener from Silverlight Toolkit, but using it I will need to implement a simulation of pivot movement myself.
Is there a build-in way to prevent pivot navigation?
If no, can you point me to an example on how I can animate control movement on gesture flipping?
Is it mandatory that the user has to remain on the one PivotItem?. If not, you could just disable the second PivotItem so that the user knows that it's there, but can't actually interact with it.
secondPivotItem.IsEnabled = false;
Alternatively, you could dynamically insert the second PivotItem when you want it and remove it when you don't. For example, when recording:
mainPivot.Items.Remove(secondPivotItem);
then when you want the second PivotItem to appear:
mainPivot.Items.Add(secondPivotItem);
The only "problem" with this is that when you only have one PivotItem on screen, the user can't scroll. However, this is how a Pivot control is supposed to function.
If you really want the user to scroll back to itself, you could create a blank PivotItem (with no header). Then, handle the Pivot's LoadingPivotItem event. Check if the item that it about to be loaded is the blank one. If so, then use Pivot.SelectedItem = recordingPivotItem to navigate back to the recording PivotItem. You can then use the above method to dynamically add the second PivotItem when the recording is over. This isn't the normal UX for pivots, but should do what you're trying to achieve.
Seems to me that the best solution is making the pivot control invisible to hit test altogether. I simply set PivotMain.IsHitTestVisible = false and set it back to true whenever I am done recording.
There is a good attached property approach on how to make a particular element hit test visible, while casting an entire panorama or pivot item hit test invisible:
Here is the link to a blog post of an author with the source code:
http://blogs.msdn.com/b/luc/archive/2010/11/22/preventing-the-pivot-or-panorama-controls-from-scrolling.aspx
Works for me until the dynamic loading and removing of the pivot items with textblock header will be added to the SDK's pivot control.
The down side of locking a person into a pivotitem or disabling one so that a person cannot navigate is that you are going to frustrate the user. PivotItems are meant to be flicked to and from, and writing an app that has behavior different than this is going to take away from the user experience, because the app is not going to behave the way they expect it to.
Personally, if you are going to lock them into one pivot item, I think you should go ahead and create another page without a Pivot control and navigate to it. Also, whether you choose to do it this way or not, you need to keep in mind that regardless of whether they are locked into a certain pivotitem or they are navigated to another page, the back button must work as expected, or the app won't pass certification.

WP7 pivot headers stop animating when I scoll too fast

i have a pivot control with around 20 items that are data binded to an observable collection. One of these items has a long text inside, and I think it delays a bit to data bind. when i scroll too fast and pass this item, the headers start to behave strange, the highlighted header disappears from the screen and i see the other headers. the animation of headers stops.
How can i fix this? any ideas? You can reproduce this problem on a device.
thanx
I would have though that having 20 pivot items was more likely to be the cause of the problem, rather than a long pivot title. However, from a user experience point-of-view I would suggest that 20 pivot items is not going to provide a good user experience especially as all pivot items are loaded on when the pivot is started, so performance is likely to be poor, too.
I would suggest that you consider an alternative approach. Perhaps you could use the Panorama to provide a Hub-like experience with your data grouped into different Panorama items. You could then use a Pivot on secondary pages to show group contents where appropriate.
I can't say that I've experienced this, but then I haven't found a need to use a Pivot with 20 pages.
Could it be that if you're finding the need to flick that quikly through the pages that another UX would be more appropriate?
Perhaps a listbox to present a choice of items allowing ultra smooth and fast scrolling, from which the user can choose to select an item and drill down for details.
The databound project template provides some out of the box handling to demonstrate the concept, but don't be show to roll your own in a vanilla project template.
I've experienced the same issue with a pivot control with only 4 pivot items. The animation gets screwed up when the pivot item containing a long list is selected, so I'm guessing that because pivots don't load their data until the item is selected, that the pivot control is getting screwed up trying to load the long list while animating...so it gives up on the animation.
I haven't really figured out what to do about this yet. One solution is to not bind the data in the pivot item until that item is selected. This isn't really ideal, but it would likely solve the animation issue.

Resources