Highlight selected image in Windows Phone XAML? - image

I am currently using the Image control in XAML, when the user taps on the image I want to display another image like a tap effect*, so for example I want to make the image a bit darker or lighter once the user taps on it, how can I do this using the image control?

I've managed to fix this with adding a new image to the mousebuttonup, mousebuttondown and mouseleave event of the image control

You could place a collapsed image with the same size at the same position as the first one. If the user taps the image, you show the previously collapsed image.
If you want to make your first image darker, set the background of your hidden image to black and opacity to 0.25 or something like this. When it gets visible your first image will be slightly darker.

Instead that you can try to customize the style of your button. In Visual State>>Pressed>>You can change the Color or you can give some animation as well.
tHANKS,

Related

React Native bunch of buttons on top of background image

I have a background image and I need to add bunch of oval buttons or images on in my case the "greenish" buttons on top of the background image, that I can click in each one of them and call a function passing a parameter. Please look on the screen shot and let me know how I can position every one of the buttons on top of the image and access them with a click (onPress). I guess the only way is using flex box but I couldn't figure out the style for it.
Thanks
Just style all the green buttons on relatively to the image's boundaries with position: absolute. Percentage values for positioning should work, if your image scales properly on screen size change.

how to color a particular part of image in photoshop

Hi guys I am new to photoshop I have spirit image here which has multiple images in same images for example I have cart image here alongside of phone call image. I just want to change the color of cart to red.. I have photoshop and went through tutorials but hue/saturation doesn't help enter image description here
can someone help me or provide me steps how to change color.
Your screenshot seems to show that your sprite image is a transparent PNG, so you can click the Lock Transparent Pixels button on the Layers panel on the right. Then you can pick the color red you want in the Color Picker and use the Brush tool to paint only the cart.
You can select just one image, or a specific part of a larger image, by using the 'magic wand' tool.
Click this icon, or the icon most similar to it in Photoshop:
Magic Wand Tool
Then select your shopping cart by clicking on a portion of it which is colored, then you'll be able to change the color with the paint bucket tool, or by using the menu at the top of the screen.
You'd click 'Edit' then 'Fill' to fill your selection with the color chosen in your color picker currently.
For changing a color you have to go to right footer and there you'll see fx (Add a layer style) -> Color Overlay.
From there you can change the color of your cart
For reference I am attaching the images.
Fx Menu
Color Overlay

In XCode 8, how can I make an image button with padding?

I have an button, and I told it which 'image' to use (setting the image in 'background' works too). I would like to make the image inside the button to be smaller than the button. I tried changing the content insets, the title insets, and the image insets, but none of them seem to be working. The content and image insets scoot the image around, but do not make it smaller.
I would like to accomplish this in the main.storyboard, and not do it programmatically, if possible.
Not the best solution but if you need any easy work around you can add the image as an UIImageView and then add a clear button over it with the padding u need

QT QPushButton with an icon and overlaid centered text

I recently took to Qt Programming and want to port my app to Qt.
I'm fiddling with QPushButtons and I've managed to display an image into the button and to set some text to the button but, whatever I do, with or without the designer,
I have the same problem, the text is aligned right to the icon instead of being overlaid over the icon.
addButton = new QPushButton();
addButton->setIcon(QIcon(":/AddButton.png"));
addButton->setText(tr("+"));
addButton->setFlat(true);
addButton->setIconSize(QSize(100,90));
What am I missing ?
I know there is the toolButton but it doesn't seem to have the "flat" property.
Any idea please ?
Thanks a lot,
Mike
If you are trying to use your image as a background image, you can use a style sheet:
addButton->setStyleSheet("background-image: url(:/AddButton.png);"
"background-repeat: no-repeat;"
"background-position: center center");
You'll just have to make sure the size of your button is at least as big as the image.

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