How shadow TextBlock in Wp7 Mango - windows-phone-7

In windows phone mango, how can i set a shadow on a TextBlock?

There's no a DropShadowEffect I'm afraid.
You could try out something like this though:
With the image you can just simply create a drop shadow in Photoshop/Gimp etc (works well for me) and save it as .png.
With TextBlock it is a bit harder. For instance, create a half-transparent image with the shadow and place both TextBlock and the Image inside the Canvas. Change the Canvas.ZIndex="integer" attached property to place them in a specific order - image has to be underneath. Also shadow should be blurred.
The drawbacks are:
Shadow is static.
Doesn't really suit metro UX.

Related

How is/can the WP7 Office Hub panorama header markup be created?

WP7 Office hub panorama header looks like this:
What is it?
one solid image
two images (one for logo, one for "microsoft Office")
all vector elements
The answer interests me only because I know how to achieve this only in the first two cases.
Basically I need to create a TextBlock in PanoramaHeaderTemplate, that would be like this:
<TextBlock Foreground="Black"><Run Text="smallBold" FontWeight="Bold"/><Run Text="Normal"></TextBlock>
So the resulting panorama should have a look:
If I use FontWeight directive in the PanoramaHeaderTemplate - it for some reason has no effect.
If I use PanoramaTitleTemplate, I get the controllable text weight, but I have a panorama header element appear for some reason, that only displays a x:Key element name of the PanoramaItem, that results in an appearance of a header I don't need at all. This happens even if I don't define the panorama header.
So which is the correct way to achieve the look on the Panorama "upper element", whether it is Title or Header, that is shown on the smallBold.Normal figure?
I don't know what Office uses but it's irrelevant because, as a native app, it wasn't created with Silverlight.
You can create the same effect by changing the Panorama.TitleTemplate to contain whatever you want (TextBlocks, images, etc.). You may also have to adjust the defautl Style applied to the template to set a Height and Width for the PanningTitleLayer.
It's an image, straight across the panorama. It's very simple, as the panorama view was set up to display long images to support a better scrolling feel for the user.
So i would look into using images, as it's easier to achieve, what you are trying to do, with images, rather than a background image.
Some useful related questions/articles:
May Help, StackOverflow
UI Concepts For Windows Phone 7
How I made the ‘myChannel9' wp7 app
Capturing Windows Phone 7 Panorama Images

Place opacityMask over panorama background, but not its contents

I want to create a mask effect so I place a mask over my panorama page, but this would place a mask on my entire screen. How can I make it so that it would only place on top of my panorama background but under my panoramaitems?
You could retemplate the the Panorama control to add the mask over the background image.
I've found some issues with doing this in Mango though and so have chosen to manipulate the background image directly. This also led to code which was simpler to follow. (In my opinion.)

masking with an image in iOS

I'd like to take an image and use it as a mask for a view on which I add numerous image views. I know of the quartz CGContextClipToMask() call but what would be the best way to approach this? Can I override the drawRect method of a container view, call CGContextClipToMask() within it, and then expect its subviews to adhere to that clipping region? It doesn't seem to work.
Do I need to instead add some blocking mask image over top?
Instead of subclassing or overriding drawing functions, I chose to overlay the images with an image that had transparency in the viewable portion. i.e., if my 'surface' was an image of a parchment, and I aimed to draw a bunch of images on it. I would have the parchment image, then a container UIView for any images to be put on that parchment, then a masking image over top of that which was the original parchment image but with the parchment itself converted instead to full transparency, while the surrounding area is left exactly as the background the parchment is on (then all other UI widgets over top of that).
This seems a viable solution in all cases except if one were to need some image to visually animate around and behind the parchment (not my case).

Transparency in splash screen

I saw the splash screen of the Corel-Draw 12 application and lost my mind!
What technique do they use?
On application start-up they load a transparent image, use windows api or what?
How do they achieve this transparency?
Here is a demo project for both VB.NET & C#.
If you are using winforms with vb.net you can modify the opacity of any form by setting the Form.Opacity property. I am not familiar with the splash screen you are speaking about but it shouldn't be too difficult to achieve a similar effect.
If you're using WPF, set the AllowsTransparancy, WindowStyle and Background attributes on the Window object:
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
AllowsTransparency="True"
WindowStyle="None"
Background="Transparent">
<!-- more -->
</Window>
I am also unfamiliar with this flash screen... but if it slowly fades or something, then I would go with Quintin's answer here. Opacity at a certain percentage will show another form through yours.
If the splash screen is just an image and some of it is see-through and some of it isn't, then you can set the transparency key on your form to a certain color, then set the form's background color equal to that, and then whatever image you wish to display should be loaded into a picture box. Make sure you use a .GIF image though! or some other format that supports deleting out the background. JPG's and BMP's are worthless here since their "empty" color becomes white instead of transparent.

How to make an image as transparent in BlackBerry?

I am new to BlackBerry Java application development. My scenario is: In my application a gallery list of images will be displayed in a small icons. If I click on any image it will display in a large mode. Here I need to provide controls like front and back buttons. On clicking on those buttons the background image should change. In addition to that those buttons should be highlighted and the back ground large image should be transparent. How to do this?
Please guide me.
You can use Graphics.setGlobalAlpha() on paint() or to modify bitmap before preview.
Don't forget to set back normal global alpha value after bitmap drawing.

Resources