panorama background shrunk - windows-phone-7

i have a panorama view and would like, once i reached the end of my view, to be able to continue to the front (having my background image with matching ends) so that it looks like it is continuous, but when i go from front to end or vice-versa, as i slowly scroll left/right i can see the other end of my picture compressed(and once i get to that panoramaItem, it is decompressed looking natural).
My background is 1024/800 so it is ok by microsoft and my panormala code is :
<controls:Panorama>
<controls:Panorama.Background>
<ImageBrush ImageSource="/_Assets/Layout/pasta-bg-3.jpg"/>
</controls:Panorama.Background>
<!--Panorama item one-->
<controls:PanoramaItem Header="a" Orientation="Horizontal">
</controls:PanoramaItem>
<controls:PanoramaItem Header="a" Orientation="Horizontal">
</controls:PanoramaItem>
<controls:PanoramaItem Header="a" Orientation="Horizontal">
</controls:PanoramaItem>
</controls:Panorama>
Am i doing something wrong?

You'll need to adjust the size of your panorama background image depending on the number (and width) of panorama items youre using to achieve this effect.

I guess proper values for the Width property of the panorama Items , solves your problem.

Related

Make WP7 Panorama Item Title Smaller or Wrap?

My text is getting cutoff in my Panorama View, I am wondering is there away to wrap the text or make it smaller so it won't get cutoff?
Thanks
Have you tried changing the TitleTemplate?
<phone:Panorama Title="my application">
<phone:Panorama.TitleTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" FontSize="50" Margin="0,50,0,0"/>
</DataTemplate>
</phone:Panorama.TitleTemplate>
</phone:Panorama>

long list selector not scrolling properly

My LongListSelector is not scrolling properly. When I scroll the list, it automatically reaching back to the top with its rubber band effect.
xaml is
<Grid x:Name="ContentPanel" Height="2000">
<toolkit:LongListSelector x:Name="ItemList" DataContext="Item" IsFlatList="True" StretchingBottom="LoadMoreData">
<toolkit:LongListSelector.ItemTemplate>
<DataTemplate>
<Grid Tag="{Binding ItemID}" Loaded="Grid_Loaded" MaxWidth="361" MaxHeight="100">
// some xaml code
</DataTemplate>
</toolkit:LongListSelector.ItemTemplate>
</toolkit:LongListSelector>
</Grid>
can anyone help me ?
thanku
It's not scrolling correctly because you set the Height of the parent Grid to 2000. This causes the LongListSelector to take as much space as it may need as long as it's less than 2000 and only then starts scrolling. Considering you only have 800 (or a bit more) of height, you don't see the scrolling properly.

How to make a scrollviewer gain focus when selected

I have a project where I have multiple scrollviews in one:
I can scroll up and down through a single item, and also through multiple items horizontally.
Normally, the webview is not hittestvisible.
Moving horizontally works fine, but when I scroll down, I give focus and hittestvisibility to the single item, but it won't scroll down. Only when I scroll down the second time, it will scroll, I think because when the ManipulationStartedevent was fired, it was caught by the scrollview, which had focus at the time, and only later the webview takes the focus, therefore, it has no started position. Is there a workaround for this problem?
<ScrollViewer x:Name="Scroller"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Disabled"
ManipulationMode="Control"
Grid.Row="1" Grid.RowSpan="2" >
<StackPanel Name="WebScrollView" Orientation="Horizontal" >
<UserControl Name="LeftContentControl" MinWidth="480" />
<UserControl Name="MiddleContentControl" MinWidth="480" />
<UserControl Name="RightContentControl" MinWidth="480" />
</StackPanel>
</ScrollViewer>
So, Left, Middle and Right are the three controls which will hold the webviews as their content. When scrolled to the left( for example ), the left content is placed over the middle content, and the middle content is set into view again, so it seems like an endless list of webviews, but really are three.
I use a mediator to achieve the animation of the webviews.
Thanks in advance.
GeekPeek

Bing map rotation in windows phone pivot

I have a trouble when try to rotate MapBase. As far as I didn't find a way to rotate content inside map(i mean tiles). I made a rotation transform with map itself and put it in square to emulate a rectangual viewport.
The problem is the map corner flows over corner of square while rotating and what worst it moves over pivot items titles and I don't know how to bring it to the bottom.
Is there any workaround of that? Or may be other way to rotate the map content?
UPDATE
XAML CODE
here is my code
<Grid x:Name="LayoutRoot" Background="Transparent">
<!--Pivot Control-->
<controls:Pivot Title="MY APPLICATION">
<!--Pivot item one-->
<controls:PivotItem Header="first">
<Grid d:LayoutOverrides="Height" Margin="-44,-30,44,30">
<Microsoft_Phone_Controls_Maps:Map Margin="-18,-72,2,76" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto">
<Microsoft_Phone_Controls_Maps:Map.RenderTransform>
<CompositeTransform Rotation="36.01"/>
</Microsoft_Phone_Controls_Maps:Map.RenderTransform>
</Microsoft_Phone_Controls_Maps:Map>
<Rectangle Fill="#FFF4F4F5" Height="54" Margin="-14,-42,0,0" Stroke="Black" VerticalAlignment="Top"/>
</Grid>
</controls:PivotItem>
<!--Pivot item two-->
<controls:PivotItem Header="second">
</controls:PivotItem>
</controls:Pivot>
</Grid>
In the example is on the top of map, but map is on the top of Pivot headers and even application title is on the back of map corner...
And If you Load another page in "Paysage Orientation" when you rotate your phone ? (It's maybe a temporaly solution... ) but you want to reaload your map with good dimension.
It's not a good idea to use a Map Control inside a Pivot if gesture interaction is enabled.
Don’t use Slider, ToggleButton, or Map controls in a Pivot control. Don’t use controls that can pan or scroll inside a Pivot control. For example, if you put a Map control inside a Pivot control it might be difficult to use the Pivot control. The gesture input gets confused. The solution is to navigate to a subpage with controls that require gesture input. You can place a map in a pivot page as long as the map isn’t enabled for gesture interaction. You could overlay a button that would activate the map. Pressing the button would actually navigate to a separate page with just the Map control on it. The user could then press the Back button to go back to the Pivot control.
http://msdn.microsoft.com/en-us/library/windowsphone/design/hh202919%28v=vs.105%29.aspx

WP7 - ListPicker in StackPanel in ScrollViewer

Just started with developing for WP7 and came across the following. I have a pivot application with a few pivotitems. On the first pivotitem (see code below) I want to be able to adjust a lot of settings. For this question all items to be set are called 'TextBox' and the choice in the ListPicker is either A,B or C.
Now if I do NOT use the ScrollViewer and I tap any of the listpickers I get to see all three options BUT I can not scroll through all listpickers.
If I DO use the ScrollViewer, I CAN see all listpickers but only the top one (that's visible) will expand and give me the options A,B and C, they others stay collapsed.
How can I get every listpicker to expand and show me the avaiable options AND be able to scroll to every listpicker on the page?
PS In code below copy the stackpanel between start and end about 15 times.
Thanks in advance for any help!
<controls:PivotItem Header="blabla">
<ScrollViewer>
<StackPanel Margin="0,0,36,0" VerticalAlignment="Top" d:LayoutOverrides="Width">
// start
<StackPanel Orientation="Horizontal">
<TextBlock TextWrapping="Wrap" Text="TextBox" Width="80" TextAlignment="Right" Margin="10,22,20,0" HorizontalAlignment="Right" VerticalAlignment="Top" />
<toolkit:ListPicker Margin="0" Width="275">
<toolkit:ListPickerItem Content="A"/>
<toolkit:ListPickerItem Content="B"/>
<toolkit:ListPickerItem Content="C"/>
</toolkit:ListPicker>
</StackPanel>
// end - copy/paste code code between start and end about 15 times right here
</StackPanel>
</ScrollViewer>
</controls:PivotItem>
This is, apparently, a common issue with Listpicker and ScrollViewer. You can find a workaround here
Should anybody stumble upon this, this has been fixed since the november 2011 release of the wP7 silverlight toolkit.

Resources