WP7.5 Mango Tile BackContent alignment - windows-phone-7.1

Is it possible to center-align the BackContent of a tile?
For example:
54"
2-2
I want the above two lines aligned centered on the back side of a tile. Is this possible?
Sample: http://www.silverlightshow.net/Storage/Users/AndreaBoschin/__Capture.png

You have to draw the text manually onto your BackBackgroundImage as you cannot adjust the placement of the BackContent.
It is not possible to update your Tile with animations or sound. The
placement of the Tile properties is not customizable.
MSDN Source
Edit: Have a look at this question, there is example code showing how to do it.

Draw a image, where it's aligned, and use that as a back property. I've written a guide about it.
(For the front tile, but the backtile is no different).

Related

Image position between inputs xcode 6

Good afternoon,
I'm trying to put an image in the middle of two inputs, that means that I would like to have the same margin to the first input as the second input. I'm going to explain better with an example:
[input a]---- 20px-----[image]---- 20px-----[input b]
I want to have the image always at the middle between them, because when I rotate the screen I have to make it large.
I have to use constraints? Which one? Is it possible?
Thanks in advance.
There are a number of ways to approach this. (There are a number of ways to approach everything, lol).
I'm only going to show AutoLayout solutions because it will make things easer when things are moving. Also, your description is pretty much already using AutoLayout Visual Format Language.
The first would be to place inputA, inputB and image into a third view which I'll call interfaceView.
Now you can lay it out like this...
|[inputA] // i.e. up against the left edge
[inputB]| // i.e. up against the right edge
[image] is different. You then align the centre of image with the centerX of interfaceView
The second option is to use "spacer" views.
Create two more views called spacer1 and spacer2 and layout the screen like this...
[inputA][spacer1][image][spacer2(==spacer1)][inputB]
Make spacer 1 and 2 hidden. They are just there for layout purposes. Now, because I have given them equal widths they will align the image view exactly in the middle of A and B.

Custom UiTableView from array data

I have a custom table view and want it to look like this...
(source: pulsewraps.co.uk)
The image is loaded via async and the two lines come from two different arrays. I can get all the data in fine I just don't know how to lay it out.
I want:
the black gradient to overlay the image
the two lines of text to be within the black gradient box
the image to fill the table row to cover it and keep it's aspect ratio
the black gradient box to be pinned/constrained to the bottom of the image so that is either line of text is larger than two lines it covers more of the image and doesn't drop below it.
I fill the table data in a loop according to the number of records in my array which is populated by json.
I have managed to do the layout in android but can't get my head around ios.
Any help much appreciated.
If you're using autolayout, you'll want to constrain the labels to the bottom and to each other. Then put the gradient view behind the labels and constrain the top of the gradient to the top of the top label.
You'll have to handle drawing the gradient yourself, either use an image in an image view and set it to scale to fill, or subclass UIView and add a little bit of code to drawRect: The first is probably easier, the second will produce a more uniform gradient if it has to be scaled.

How to make color bar above navigator in Highstock?

I have chart showing time data. I have two points back in time which I need to "mark" in the chart.
I currently indicate these two by plotlines, but would like to show bar, with let's say green and blue bars showing the timespans (for example -13days from now with blue and -90days -> -13days with red).
I would use plotBands, but I can't specify their height and do not want to have them all over the chart.
Is there some way? I saw something about translating pixels and drawing rectangle, but wasn't able to make it work. Also - I zoom a lot in this chart.
You can use Renderer and add custom shape. In other cases, please attach mockup of your goal.
http://api.highcharts.com/highstock#Renderer

CSS sprite position problem

I trying to create a fixed border to the site that dynamically change size with the browser window from this sprite (it isn't perfect I know.): http://fc07.deviantart.net/fs70/f/2011/269/7/0/bordersprite_by_nakos-d4ayzne.png
DEMO on jSFiddle
My problem as you can see is the vertical wall part. As the #falJ and #falB are height:100% they include the bottom wall's end too with the space between the two wall sprites. Is there a way to force backround-position to only use vertical wall part without bottom wall's end?
Thanks in advance.
Solution: http://jsfiddle.net/vonkly/Ld43B/
It's not the prettiest thing in the world, but it achieves what you want. Check out the source code & direct link for the background images to see what you'll need to do. It's currently set at 299px wide; I imagine you'll be using something wider.
I'd also suggest adding some padding around your content (either with a p tag, span, another div, etc.) - the way it is currently set up isn't what I'd recommend for readability.
EDIT
The only way I can imagine achieving a fluid width + height box with the borders that you have in the way that you want is to use a second image for the west and east containing divs. This should work with your current method.

Implementing a 'tag panel' control in Delphi?

Please have a look at this screenshot
alt text http://www.maclife.com/files/u18/Yep3-big.jpg
I think these are the main features of such a 'tag panel':
1) Each tag on the panel is a standalone control and can be clicked
2) Auto line wrapping when there is not enough space to show the next tag in the current line.
3) Rounded corner rectangle border for each tag is a nice-to-have feature.
I want to implement the similar function in Delphi, Is there an existing control to do this? If not, what's the best way to implement such a control?
Thank you.
When you are on a recent Delphi version use a TFlowPanel and some appropriate controls for the tags. A simple TButton or a TLinkLabel should do for that.
Each clickable tag doesn't necessarily have to be its own control. It just has to be a region that you can detect being clicked.
Suppose you represent each area as a Windows region. You can figure out how wide each one should be based on its text with the TCanvas.TextExtent function. Then create a region with a function like CreateRectRgn. For rounded corners, try CreateRoundRectRgn instead. You can test for mouse events in each region with the PtInRegion function. You can paint borders around them with FrameRgn. The last obstacle is to draw them on the screen so they'll all fit. You're creating the regions and you know their widths, so assign tags to a row until you run out of space, and then start the next line.
There are two possible solutions to custom alignment in Delphi 7. You can make your own flowpanel by deriving from TCustomPanel and override the AlignControls( )-method, or you can set alignment to alCustom and handle the OnAlignPosition-event.
I guess I would have gone for the TCustomPanel-derivative option. TFlowPanel in form Delphi 2007 uses that option- I have to admit, though, that I have never tried either my self...

Resources