Silly question, but how do you scroll down in the wp7 design pane for visual studio ?
I have a lot of StackPanel elements in the page and the design pane only shows the first ones who fit the wp screen. i can't find a way to scroll down to the other elemets.
in the capture attached, you can see that after "Units in stock" it doesn't show anything else although i have more elements after.
Have you tried increasing the design height in the statement which somewhat looks like this? You may find it on the top of your XAML page.
<phone:PhoneApplicationPage mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="1500" />
Unless I'm not understanding the question, just put your StackPanel inside a ScrollViewer. That's what I've done in my apps.
Related
I have a registration form on my layout grid, made out of a stackPanel. Textboxes are taking most of the screen (800px) along with a button. When user is positioned in one of the text boxes, keyboard covers almost half the screen and in order to access boxes below, they first have to click somewhere blank to remove the keyboard and then click another box. It isn't possible to scroll down.
I want to enable same behaviour like when editing name in contacts, but didn't manage yet. How to achieve this?
Try wrapping it into a ListBox or a ScrollViewer (probably easier), like so:
<ScrollViewer>
...
</ScrollViewer>
Also, check to make sure you don't have the same problem described here.
I'm not a WP7 developer but here's what I do in Android and iOS and you may get a hint of what to do.
I wrap my forms in a Scrollable View. This gives easy scrollable features to users without the need of anything else.
I am using Expression Blend for Windows Phone development. If I insert a layout (grid, stackpanel..) that expands LayoutRoot I cannot see the controls beyond the border. Is there any way to overcome this?
If you look at your PhoneApplicationPage XAML, you should see in the first tag:
d:DesignWidth="480"
and
d:DesignHeight="800"
You can manipulate these to extend the design surface to something that lest you see everything. This will have no effect on the runtime version of the page.
Click on your top level control in the Objects and Timeline panel. Now you should be able to drag the sides/corners to shrink and expand the control's area. This affects just the size of your control on the design surface, not the runtime size (assuming you've set width and height to Auto).
I have a StackPanel in ScrollViewer with many TextBlock+TextBox (so on the screen I see same scrolling list view like in phone's standard Settings page).
In VS's or Blend's designer is it any simple way to see controls which are bellow the bottom of screen? (I need some kind of scrolling in designer). It must be something simple. Now I am switching off visibility of upper controls to see lower controls and it is boring.
Change the d:DesignHeight to a larger value, such as 2000 (the maximum height), and Expression Blend will allow you to see content that otherwise would require scrolling.
Example screenshot
I've got a page with the following XAML in my application.
<ScrollViewer VerticalScrollBarVisibility="Auto">
<toolkit:WrapPanel x:Name="WrapPanelImages" />
</ScrollViewer>
In the page constructor I load a set of images into the WrapPanel. These images are being displayed correctly but scrolling isn't working very well. I'm testing this on the emulator. The problem is that if I drag and scroll downwards as soon as I let the mouse go the ScrollViewer is scrolling back to the top. So it is impossible to get to the bottom of the WrapPanel. If I add the HorizontalScrollBarVisibility property to the ScrollViewer and set it to Auto I get a long line of images that flows off the screen horizontally, but the scrolling works in that case i.e. if I scroll to the right and let go of the mouse it doesn't scroll back to the left automatically.
How can I fix this scroll-to-the-top behavior? Or is this a bug in the emulator? My AppHub registration has not been approved yet so I can't sideload the app on my phone to test it.
At a glance this sounds like the same problem you get when wrapping a TextBlock in a ScrollViewer and you haven't constrained the ScrollViewer's size to the device height.
Check your ScrollViewer isn't some very large height such that the content is fitting entirely in it without needing to scroll.
If that is the case the action of it bouncing back is normal for trying to scroll past the beginning or end of the content.
I have tried adding a progressbar to my Windows Phone 7 application, but it doesn't show in the emulator. Am I doing something wrong? Can you give me an example of how to implement the progressbar?
I actually put the progress bar on a grid with a Panorama control. It seems that the Panorama control sits on top of the progress bar unless you set its visibility to collapsed. Once I set the Panorama control's visibility to collapsed, I could see the progress bar.
Thanks for all your help, though.
With IsIndeterminate = false, you simply write code to update ProgressBar.Value to reflect how far through your processing your are.
This assumes you can quantify your progress of whatever processing you are doing in terms of a percentage.
For cases where you can't quantify this, say for example downloading content of unknown size, you can set IsIndeterminate = true.
Early on it was recognised the storyboards used to implement the IsIndeterminate = true ProgressBar animation were very costly and had not been implemented on the render thread.
In response Jeff Wilcox posted this solution.
Jeff Wilcox – A high performance ProgressBar for Windows Phone
And this update, which Matt has referred you to.
Jeff Wilcox – Windows Phone performance progress bar update: part 2, remember to turn IsIndeterminate off when not needed!
Do not use the progres bar which ships with the SDK.
Use this instead.
You use it like this (from the above linked page):
<ProgressBar HorizontalAlignment="Left" VerticalAlignment="Center"
IsIndeterminate="{Binding IsProgressBarVisible}"
Style="{StaticResource PerformanceProgressBar}"
Visibility="{Binding IsProgressBarVisible, Converter={StaticResource VisibilityConverter}}" />
You either need to set a value on it, or set IsIndeterminate=true, or it doesn't show/do anything.
You can set the Canvas.ZIndex property to put in front of the panorama controls.
E.g.
<ProgressBar x:Name="ProgressBar"
Canvas.ZIndex="100"
Width="400" Height="30"
IsIndeterminate="True"/>