Tiling (repeating) image on Windows Phone 7.5 background - tiles

I need to repeat or tile a single image (size 9x9) across the Windows Phone 7.5 background.
How can this be done? I haven't found anything using Bing.

In WPF you normally would do it with a tiled Grid.Background as described here. But in WP7 this unfortunately is not possible. So the only ways of achieving this are writing something yourself or using a component.
One component is presented in this blog post. It is basically a panel filling itself with the same image over and over again. At the end of the article there is a download link. Download the zip, unzip it and add TilePanel.cs to your project.
Then you can use it as follows in your XAML:
<local:TilePanel x:Name="pnlTile" TileWidth="62" TileHeight="62">
<local:TilePanel.Image>
<ImageBrush ImageSource="ApplicationIcon.png" />
</local:TilePanel.Image>
</local:TilePanel>
Don't forget to add the namespace:
xmlns:local="clr-namespace:WiredPrairie.Controls"
The panel will be filled with the image specified in your XAML. Adjust image and size as needed.

Related

Adding custom Button to AppBarButton in Windows Phone 8.1

Just getting into Windows Phone 8.1 development.
I quite like it but I am struggling getting accurate development info.
I am working with the Page.BottomAppBar.
I want to use an png image I have created as one of the buttons.
Does this image I created have to be:
A certain size
A certain format
A certain choice of colors i.e. i can use multiple colors and not just black and white
I am looking to create a 'Login' button you see.
thanks
Please, check the official Microsoft guidelines for app bars for Windows store and guidelines for windows phone. Guidelines cover icons, sizes and formats. It's better to follow them in designing visual style of your app.

Xamarin.Forms custom loading gif as activity indicator

I would just like to know of something is possible as I am very new to Xamarin and I am on a time limit for an assignment. I don't mind some trial and error, but don't want to waste the time if it isn't possible
I want to have an animated gif as an activity indicator (it is a logo).
I have it working in a WebView - is it possible, in Xamarin,Forms to have this appear as an overlay while waiting on long running methods?
For example. if user clicks on a button, the app gets some info from a webservice then displays in a page. While waiting I would like to show the webview (or any other way to show an animagted gif).
So I am not asking for the code, but just if it is posible.
Thanks in advance
I was able to work this out
With the animated(loading) gif running in the WebView page I called a couple of async methods using following
await Task.WhenAll(method1(), method2());
await Navigate.PushAsync(new NextPage(var1, var2));
The laoding gif (which is an animated logo) runs until the tasks are complete then navigates to the next page
Using an ImageView apparently this doesn't look like its possible to playback animated Gif's as can be seen here http://forums.xamarin.com/discussion/17448/animated-gif-in-image-view.
So i very much doubt the ActivityIndicator would, if it could. In the ActivityIndicator I can't see any functionality to change the content of the what is shown when it is busy.
You could always create your own animated image view by creating a custom renderer instead however. It isn't particularly hard to cycle images at pre-determined gaps if you have a list of the images split up.
GIF images can be used in Xamarin forms to show custom activity indicator, since in Xamarin forms it is not possible to show GIF images directly web-view must be used. For android image must be placed inside assets folder and Build Action must be set to AndroidAsset. For iOS image must be placed inside resources and Build Action must be set to BundleResource. AbsoluteLayout can used for placing the image to center, IsBusy property of mvvm helpers nuget can used for controlling the visibility of the activity indicator. Dependency service must used for getting the image path. You can check this https://github.com/LeslieCorrea/Xamarin-Forms-Custom-Activity-Indicator for example.
Xamarin.Forms now supports .GIF, from version 4.4-pre3 and up on iOS, Android and UWP. Before using, first add the .GIF to the platforms projects, or as an embedded resource in the shared project and then use it like a regular image. The API on the Image control has been extended with the IsAnimationPlaying bindable property.
For e.g., loader.gif is added in all platform projects, then below code make it animating.
<Image Source="loader" IsAnimationPlaying="True" WidthRequest="36" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" />

How to make or get tile sized Windows Phone vector icons

I am familiar with the standard application icon images that come with the Windows Phone sdk, but I would like to use some of these images as demonstrated on the standard start screen, with the 173x173 dimensions for the application tiles. I've tried resizing these, but they are so blurry they aren't worth using. Is there a place to download the same (or similiar) images that come with SDK except in a larger size?
Also have a look at the Icons8 icon pack, they only ask for a link to their site or $199 without a link
Have a look at Metro Studio by Syncfusion. I use it in all my applications and its free.

Is it possible use camera inside from a xaml page?

I was wondering if it's possible open camera inside a small piece of screen from a custom xaml page. I'm not sure if WP7 API support stuff like that.
Version: Windows Phone 7.5 Mango
You can use the camera as a live source of image data in your application. This is well documented in the Code Samples for Windows Phone MSDN page. The demo code produces a simple application as follows:
You simply create a brush in XAML:
<VideoBrush x:Name="viewfinderBrush" />
And wire it up to your camera in code-behind:
viewfinderBrush.SetSource(cam);

Silverlight - Taking a "screenshot" from within silverlight itself?

This is kind of vague as the control has not been designed yet and I thought I would ask before going with it.
I will have a control that shows an object within Silverlight.
The user can rotate the object etc.
Now, the user needs to be able to copy what they see to an image. Is this possible somehow, or do I have to render it somewhere else?
So it's not a screenshot per se, but a printable image of a specific control / area of the screen.
http://blog.blueboxes.co.uk/2009/07/21/rendering-xaml-to-a-jpeg-using-silverlight-3/
In Silverlight 3 there is way to write XAML to WriteableBitmap. Technique is shown in above blog.

Resources