How to include canvas under panorama page in windows phone? - windows-phone-7

I have a panorama page with two panorama item and would like to include a canvas inside the second panorama item. So, when I do it, I get a overflow of the first panorama item in my canvas. As it should be made such that it takes around one and half page. So it should be like 2 and a half panorama page with two items a panorama item and a canvas item.

Make sure all the margin values are zero. Sometimes, Expression Blend will add margins to a child control to fit into the ItemTemplate of the panorama control. Remember a Canvas doesnt act like other components, it's contents are mapped to the pixel.
Also, if you are looking to make an item 1.5 page widths, consider changing the panorama item's orientation to horizontal.

Maybe put another canvas under the grid in your second panorama item?

Related

should we use StackPanel or Grid as Listbox item template

I heard that in order to improve Listbox performance, we should use simple ListBoxItem template.
In every Listbox row, I want to display 3 images. Should I use horizontal StackPanel for those 3 images, or Grid with 3 columns ?
And, should I specify the height of StackPanel/Grid ? Doing this gains better performance ?
While making a Listbox, the best practice is to use a StackPanel.
The basic difference between a StackPanel and Grid is that, the StackPanel will automatically adjust the Orientation of each ItemTemplate as and when it is added.
If you decide to use a StackPanel, you do not need to specify the Width. You could However specify the Maximum Height of the Stack Panel to make your ListBox look better.
There is no harm in using a Grid either. It would perhaps be a better idea to use a Grid if you wish to have columns of Alpha-Numeric Data.

vb6 set listview item/subitem image

I have a listview that I want to implement the effect seen in this image:
The listview hides some items like in the image below except a
password is entered. I know that item and subitem image are usually
left aligned.
How do I set the item and subitem image to cover the whole text are of the list view as shown?
EDIT
I got a tip of how to draw the pattern in this pics from here, but how do I draw this on a listitem?
You'll be better off using subclassing and owner/custom drawing. That will allow you to draw that entire row and let the listview deal with the rest.

Irregular layout in wp7 what can i do?

See this Chart
rules:
car1 car2
car3 car4
If news has image then use car1 and car3 layout ;not image ,use car2 or car3 layout. If news has large image then it height equal car1 height + car3 height or car2 height+car4 height
My question: how use listbox dispose the Irregular layout in WP7 ?
There is no straight forward answer to your problem. Shortly, you cannot do it readily. That is there is no "irregular" layout manager with the standard libraries (e.g. something like Grid or Stackpanel). Perhaps there is 3rd party library out there but i am not aware. If there is nothing out of the box, you have 2 options:
Make each listbox item a 2x2 grid and then have some logic behind for hiding content of a cell when an adjescent cell grows its rowspan to 2. Vice versa when a big tile becomes a smaller one then you have to change the rowspan and make the hidden tile visible again. I am taking about collapsing or making visible here as an effect. But, you could of course remove the tile and append it to the end of the list. There are many options on how you want your list to behave.
You could consider using a WrapPanel (from silverlight toolkit) inside a scrollviewer to achieve a similar effect. Again, you would have to do some work here as well for reorganizing the container.

how to disable horizontal scrollbar into pivot control WP7.?

I have Image and I am zooming this image as well Draging this image and move around this canvas,
so the canvas is inside the Pivot Control and once I am trying to move from Left to Right so it will goes to the next Pivot Item so I want to stop this horizontal scrollbar into this PivotItem.?
NOTE:
I had tried with Touch.FrameReported but is not worth in my case.
Thanks..!!
You could try the Lockable Pivot control from the Silverlight Toolkit for Windows Phone :-
http://www.windowsphonegeek.com/articles/Windows-Phone-Toolkit-LockablePivot-in-depth

How to know if the element is on the screen?

I have a horizontal ListBox with Images, which are pretty big and take 80% of the screen. User scrolls through this ListBox and images change quickly, and I'd like to highlight the image which is actually on the screen. What is the best way to do it?
Personally, I would use the class proposed by AnthonyWJones in this topic:
Restoring exact scroll position of a listbox in Windows Phone 7
The idea remains the same. You'll just change the vertical listbox to horizontal listbox.
Thus, you can recover the exact position of your listbox.

Resources