Paging concept using scrollviewer in wp - windows-phone-7

I am new to wp7. I want to add three images to my page. But not on a single page. It should be on three pages. When i move the image, at that time, the image is changed and i am on the secong page keeping my header and footer fixed.
So how to add three image in one page?

Why do you want to use scroll-viewer?
1) Try using a pivot control without any pivot headers. Add your images to three different pivot items. In pivot the header and footer you specify will remain fixed, only the content will change.
2) Also you can create a single page. Add three images to a list. Bind it to your image control. On flick gesture, change the image URL hence changing the image being displayed but keeping every thing else constant.
I gave you two approaches, try using any one of them which suits you the best. For further information try studying pivots and flick gestures.

Related

How to create clickable html elements like div-s on a picture in Laravel?

I am pretty new to Laravel and I need to make a project using that framework. In that project I need to display an image in a loaded view and on that image I need to draw/display html elements like div-s for example. These elements need to be drawn using (x,y) coordinates taken from a database and also must be clickable.
The whole purpose of the project is so that people could click on elements that are drawn on the image and they could "reserve" a place for themselves. For example, imagine a company's representative reserving a spot on the exhibition floor at a conference.
How should I do it? I am a bit lost, but was thinking about using JavaScript. Here is an example image with elements on it.

Best way to represent list with image(using url) in Xamarin.Forms?

I want to create List View. In this List View, I will have following fields.
StackPanel
1- Image with 300 x 400 size
2- Text-Label Controls
1 Screen will hardly cover 1 and Half ViewCell.
Images will have ImageURL. I want to load image smoothly. I also want to make smooth scroll up/down with image appearing.
Can anybody please suggest me which control I should use?
If List View, which CacheStrategy I should use?
Note: For one of such functionality, I had used List View with default CacheStrategy. In that, I just faced 1 major problem of image appearing. When page initialize first time, it show image properly. But as soon as I scroll down or scroll up, image disappear or misplace. In that case, I had suffered a lot and removed image finally.
Please suggest appropriate way for above functionality.
Thank you.
For the listview, you should definitely use RecycleElement as the CachingStrategy. See here https://developer.xamarin.com/api/type/Xamarin.Forms.ListViewCachingStrategy/#Remarks
And because the images are URLs, you can use FFImageLoading. It will fade-in the image after it is downloaded (as opposed to appearing instantly after downloaded), and you can even specify a placeholder image to use while the image is being downloaded.

Using image instead of default + and - signs in tree view

I am developing a win32 application and I want to use my own images instead of default + and - signs in tree view.
I also found here that I can use images in four cases-
1)An image, such as an open folder, displayed when the item is selected.
2)An image, such as a closed folder, displayed when the item is not selected.
3)An overlay image that is drawn transparently over the selected or nonselected image.
4)A state image, which is an additional image displayed to the left of the selected or nonselected image. You can use state images, such as checked and cleared check boxes, to indicate application-defined item states.
I found some examples like this one(uses state images) but it seems it is not related to my query.
But I can't find how to replace default + and - signs of tree view with my images.
Please help me out of it. Thanks in advance.
The "expansion" buttons are not drawn using an assigned image list; instead they come from the current theme (or in XP/non-themed, are hard-coded glyphs).
The only way to customize them is to use Custom Draw and draw the tree items yourself.

Windows Phone dynamic layout in data template

I need to have a dynamic layout inside List box item.
Example of such layout would be the news feed on Facebook. To simplify, let's narrow it down to one news item type: Somebody added N photos. I already have an algorithm which takes image sizes and produces optimal layout.
I don't want to have 20 images with bound Width, Height, Margin, Visibility.
I do have to have virtualization enabled.
How can this be done on Windows phone platform?
Easiest method:
Place ItemsControl inside list box item. Set ItemsControl's width and height as your layout algorithm tells you to. Set ItemsPanel to be a grid. In the data template, place an Image, set margins as your layout algorithm tells you to.
Images wont be virtualized, listbox items (containing the whole ItemsControl with images) will.
Most correct method (only required if you have many images and/or large images so that single item exceeds 2048px):
Inherit from e.g. VirtualizingStackPanel, override MeasureOverride and ArrangeOverride to implement your custom layout, then spend ~2-10 days fixing virtualization-related issues in your code. This way virtualizes everything, however the time is estimate (i never did it myself), and I can't guarantee you'll eventually succeed.
Intermediate method:
redesign your layout algorithm so it layout images in the rows. Use single virtualizing listbox or ItemsControl, split your item into smaller rows, each row containing single row of images.

Customized Checkboxes

I am trying to implement image as checkbox.
I have a list with 2 columns and I want to display checbox image on right side, as a third column.On clicking that image ,the image will be changed to a different one.
In which way I can do this?
One way to do this would be to create a custom Field that extends BitmapField. This custom field could contain two Bitmap images (one for each state). You might even consider having four images, so that you can indicate when it has focus as well. For example: unchecked-non-focused, unchecked-focused, checked-non-focused, checked-focused.
When you want to change the image (i.e. on a touch event or trackball click) just have your custom Field call setBitmap() with the appropriate bitmap.

Resources