Creating custom graphics with Windows Phone XAML - c#

I am creating a WP 8.1 app with MVVM Light Toolkit. I have to call a service of weather measurings information, and then, I have to create different graphics with the indicator showing the value of the service response. For example, I have this image:
And it should be like this:
Or these images:
And should end up like this:
How can I get the position where I would put the shape indicating the value? Or in the second case, the needle pointing the value? And, how would I support multiple resolutions?

you should draw everything in a Canvas panel. There you can control the assets positions and transformations. This also requires to have objects to preserve the state of each thing. This question maybe doesn't have an easy answer but I strongly recommend to you learn about that in this links
Using XAML to write Windows 8 Games - Part 1
Using XAML to
write Windows 8 Games - Part 2
Using XAML to write Windows 8
Games - Part 3

Related

Border of Canvas should be Beziercurve / LCARS Canvas

I'm trying to program a security System using a Raspberry Pi and new Windows Universal App Platform (so I'm using Windows IoT).
This security System should look like the LCARS OS, used in the "younger" Star Trek Spaceships. I had no Problem designing the Buttons etc. but if you know LCARS, you know that there are theese so called "elbows". I thought it would be a good idea to use a canvas for that.
I tried to give the canvas a border that is drawn with a beziercurve but that did not work.
Actually I have no idea how I could resolve the problem. Is there anybody who may help (or has a complete different /better idea)?
I'm using C# with XAML for developing (Blank Windows Universal App Template).

Custom UI control for Android and IOS using C#

I've just started looking at how I can generate and port applications to Android and IOS, I've started to look at Xamarin. First, I'm looking to generate custom UI control of a 10x10 Matrix (checkerboard - each square is a different colour) with each square being able to be selected and a specific image being displayed.
After looking at the documents and looking at MVVM examples, I'm not entirely sure what the best method of doing this : How should I structure the code (should I use just SVG drawing) or is there a better method of doing this in Android and IOS ?
To be honest I would start with Xamarin Forms and create a grid control with 10x10 image buttons. This way you get the event handling built-in. This would work for iOS, Android & Windows Phone out of the box. From there you could evolve it to more native specific code if necessary.
If you want to control the look pixel perfect then creating native custom rendered views would be the option but this is much more work of course so I would not start there. On Android you would subclass from Android.Widget.View and on iOS you would do it from MonoTouch.UIKit.UIView. For both you would override the Draw method.

How to set the opacity of Tile Sources in Nokia Maps for WP8?

I want to take advantage of some of the new features of the Windows Phone 8 Nokia Maps API (Microsoft.Phone.Maps.Controls namespace).
I have a sequence of TileSource classes, each with a different image. I play the images back in a loop on the map.
In Windows Phone 7, I would create several Microsoft.Phone.Controls.Maps.MapTileLayer classes, add a TileSource to each one, and add them to the map. Then, I would use a timer to go through the layers, setting the opacity of the current one to 1 and the opacities of the others to 0.
In Windows Phone 8, there is no MapTileLayer class. I can add all of the TileSource classes to the Map.TileSources collection, but I cannot change their opacities.
If I add only one source at a time, for each frame adding the current source and removing the last, there is considerable flicker, so this method will not work
Is there a class similar to WP7's MapTileLayer or Bing Maps AJAX's TileLayer in WP8 or some other way to change the opacities of Tile Sources?
This just isn't possible with the current API. I have looked into this from a number of different angles over the past year. There isn't an out of the box solution for this. However, there is one potential work around which works but requires some work and likely isn't ideal. You can store the tiles on a server and set the opacity through a service. Basically do something like this: http://rbrundritt.wordpress.com/2009/11/27/bing-maps-custom-tile-skinner/ but change the opacity.

Visualizing Audio while recording in Windows Phone 8

I`m trying to make an windows phone 8 app which simply allow you to click a button which result in start recording and showing any visualization that indicate that its recording something like a bar or a vu meter , I managed to make the recording part, now i dont know what type of projects i should use to support making such visualization.
does Windows phone 8 apps support using XNA to draw in a box inside a xaml file ?
what is the tag i can use to draw inside using XNA code ?
If you're targeting WP8 you can't use the hybrid SL/XNA model. That said, you can certainly use a Hybrid solution that draws using DirectX. You can find general information here and a sample here (note that it uses DrawingSurfaceBackgroundGrid, you probably want DrawingSurface).

Add icons to progress ring for windows 8 app

I am constructing a windows 8 app and I wanted to change my progress ring to be pictures or icons instead of the dots like regular rings are.
Anyone have any ideas on how to go about coding this in c# or xaml?
You need to use the default ProgressRing style with Control Template and change in the way you want it. As you can see this style has 6 ellipses which represent the dots in Progress Ring. You will need to change each of them to whatever you want: Images or Rectangles or something else. Take a look on this article Quickstart: styling controls (Windows Store apps using C#/VB/C++ and XAML)

Categories