ApplicationBarIconButton not displaying - xaml

I create images from online at picresize.com to use as application bar icons. I made them 48 x 48. The only thing I didn't do was make the background transparent. Now the icons just show as white blocks and nothing else. This page, http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff431806(v=vs.105).aspx, specifies what should be done but doesn't say a must. Any thoughts or experiences in this happening to others?
appBarButton =
new ApplicationBarIconButton(new Uri("/Assets/AppBar/<my_button>.png", UriKind.Relative));
appBarButton.Text = "<text>";
appBarButton.Click += appBarButton_Click;
ApplicationBar.Buttons.Add(appBarButton);

The transparent background is a must.
Instead of using that picresize.com web service, you should probably learn to use Photoshop, Paint.Net, or any other descent image editor that works on your computer not on someone else's computer.

Related

vb transparent background with gradient

I have a problem with gradients transparency key in a PictureBox in visual basic form . I want to get a good transparency as it is in the first form (in PS)
That's what I did:
1- Drawed the picture in Adobe Photoshop (CS6) with these preset:
2- Saved the picture with this option:
3- Added the picture to a PictureBox in vb form with blue BackColor
4- Changed form TransparencyKey to blue
5-The (awful) result:
The Form.TransparencyKey property is not really what you're looking for. It will only make the parts of the image transparent that exactly match the color you specified (Color.Blue, in your case). That means that the parts of the gradient in your image that have even a remotely small amount of red or yellow in them won't match the filter.
Among the things you could try is to have your form drawn with alpha blending. Here's a library that lets you draw stuff with transparency, which looks like what you want.
Alternately I dug up a walkthrough on CodeProject. It involves a lot of chatting with forms interop and the OS, which might not be your cup of tea.
Note that GDI+, the system Windows Forms uses for drawing, is somewhat slow, especially when drawing images. I don't know what your project looks like, but if you're going to draw a lot of transparent images, I suggest looking towards Microsoft DirectX.

WinRT Surface DirectX Black Screen

I'm having a strange and irritating problem on WinRT Surface tablet when using DirectX (hosted in BackgroundSwapChainPanel). Basically once in a while (like once a day, or few times a week / while testing for few hours every day), half of my 3D scene goes black, like on the picture below (cut vertically or sometimes horizontally):
http://www.zurawcli.vot.pl/dxProblem.JPG
While this happens, the DirectX is still rensponsive and i have full control of the app.
I don't think posting code makes any sense ( i'm simply using standard SwapChain and resizing viewport and back texture whenever screen size changes - actually getting screen size from Core Window). This only happens once in a while : ( when i try to explicitly force this - like by splitting screen between two / switching between apps / and so on, I CANNOT repeat this error - viewport always resizes correctly. Then sometimes just using the app, this will happen.
Did anybody had any experience similliar to this ? Any ideas what is causing this ?
Thanks in advance,
cheers

Changing masking colour around waveform on custom Soundcloud player

before I start I'm not a developer, so apologies in advance for any potentially daft questions. Our developer has just integrated a custom soundcloud player for our website http://www.samplephonics.com/ (see when you hover over the top 8 or recent sample packs) but I want to change the light grey background colour around the waveform to white.
As far as I am aware it's configured so that the light grey mask displays the shape of the waveform as a hole, which then has solid light grey, grey and dark grey images behind to show the apparent colour of the waveform in idle, loading and playing states..
Does anyone know how we can change this mask to white, or have any ideas I can send his way? He used this example as a starting point for creating the player: http://static.soundcloud.com/demos/soundcloud-custom-player/examples/sc-player-minimal.html
Thanks in advance :)
I've previously answered this here – https://stackoverflow.com/a/14731623/236135
unless the library you want to use for waveform customisation is using HTML5 canvas, you won't be able to use change the color of that chrome (so no, not possible with either HTML5 Widget API or Custom Player API)
In short, you'd have to use canvas or manipulate the images on the server and retrieve them from server.

Apple Touch Icon Turns Black

The white background in my apple touch icon turns black?? My white background isn't transparent. The icon has a white triangle, red circle and black text. The only thing I can make out is the white triangle and red circle. Any idea whats causing this and how to make the icon keep its white background?
Much appreciated.
I'm not sure exactly what it was, but I may have narrowed it down.
The first time I uploaded the images they may have had the transparent background.
The second time I uploaded them I added the white background, but the png save for devices setting still had transparency checked.
The third time I uploaded them I saved them without the transparency checked but still got the black background.
All along I think the iOS Safari browser had the first set of images stored in cache. After clearing the cache the new image showed up with no problem.
Edit: Its the transparent background that turns it black.
As gstricklind found, if your png has alpha channel transparency, iOS will unfortunately ignore any "precomposed" directive and apply all its usual effects, in adddition to giving your icon a black background (white didn't seem like a better choice??).
The solution is, of course, to precompile the icons with no transparency. This makes it pretty difficult to utilize Android's support of alpha channels while offering itouch icons as well if a black background does not work for you. I found this tool useful when composing: http://www.gieson.com/Library/projects/utilities/icon_slayer
Same issue seen here: How to get iOS to properly respect the "apple-touch-icon-precomposed" link attribute for a "web app"
Transparent Apple Touch Icons are indeed possible. What you need to do is strip all excess information from the PNG using ImageOptim for Mac https://imageoptim.com/mac or a similar program on windows. I did extensive research and stumbled on the answer by looking at the apple touch icon used by the Virtual DJ site. This icon keeps it's transparent background on iOS and MacOS Sierra. I looked at the file size and realized how small it was compared to the custom apple touch icons with transparency that I made for my favorites in Safari. Next I looked at the file information using the inspector in Mac's Preview app. All of my custom apple touch icons had four tabs in the inspector section named General, exif, PNG and TIFF. The virtual DJ icon only had two tabs named PNG and General. Once I ran my custom images through ImageOptim the file sizes plummeted by over 90% and the extra TIFF and exif tabs disappeared from the inspector in Preview. Sure enough once I reloaded my custom images and launched Safari all of my Favorites tabs have transparent backgrounds!!!! Please see attached image for proof. Transparent Apple-Touch-Icons

Visual studio and alpha backgrounds

Seen this question asked a lot but can't seem to find an answer. So here it is. Can you use a PNG with an alpha channel as the background image for a VB app? I don't care about changing the shape of the app rectangle is fine. They just want to use a character with a drop shadow behind him as the background for the app.
In WinForms, you'll need to make a layered window.
In WPF, you'll need to set AllowsTransparency to true and WindowStyle to None.