I'm developing a Universal Windows App in VS2015 (C#, XAML).
I have an AppBarButton on a RelativePanel, The panel's background is black.
When I move the mouse over the button (Hover), it turns black with a darkgray background, which is not visible on a dark background:
Please tell me how to change the colors for the button in all mouse states: hover, mousedown,...etc.
Thank you
You need to create custom style template for button to overwrite the hover effect and behaviour.
Please open the button in Blend by using Edit A copy and then edit its template! you might need to remove some element.
Mostly it shall be a button as the property of changing color is exhibited by a button control
Related
I'm creating a windows store app and i want to
change the button color when the mouse hover on the button
use an image as a button
I am using VS 2012 and using VB.net.
Thanks
You can create a mousehover event in your code behind and in that you can do whatever you want.
A perfect and precise answer of both of your questions is the following video
Click here
I have created an app starting from the Grid App template (C#/XAML) of Visual Studio 2012. I'm using the Light Theme and I have customized the GridViewItem brushes so that the color blue is used when I move the mouse over an item.
Now I would like to change the foreground color of the text that is shown in the GridView when the mouse is over the item, using white to make it more readable. Is it possible, considering that the layout of GridView items is defined in a DataTemplate?
Here is an blog post which demonstrates styling of GridViewItem.
I'm making an cocoa application from Mac OS X, not for iphone.
I am able to set the background image of a button and uncheck bordered in the attribute inspector. However, I do not know how I set the image for when you click on it (highlighted/on click, whatever you want to call it). I want to do this because
I have found guides on google to do this with UIbutton but this isn't helpful since I'm making this for Mac.
I am using InAppStoreWindow and the button is in the Title bar. When I click on the button with the custom image, the background goes white:
Thank you very much!
You are getting white background when button is clicked because You're using incorrect type. You need to change button's type to Momentary Change. You can change it in Attributes inspector:
Or change programatically:
[buttonOutlet setButtonType:NSMomentaryChangeButton];
And for highlighting: just add another image as alternate image in Attributes Inspector and it will be shown when button pressed.
I have a C#/XAML Metro-style application with a TextBox. By default, the TextBox displays with a gray background. When I hover over it with my mouse, the background lightens. When I put my focus into the TextBox, it has a white background.
I want to create a XAML style that will cause the TextBox to always have a white background, regardless of the position of my mouse or where my focus is in the application - how can I do this?
Thanks!
Andrew
You need to edit the control template.
i have my button:
completely trasparent, text in white.
But when i click it, the background goes white and the text black, and it seems to move up :-|
i want only execute the action, i don't want those strange effects. any ideas? thanks!
That's the default behaviour of Button control,
if you want to avoid it you have some options:
Use another control like textBlock and use OnMouseLeftButtonDown/Up
Customize the template of your button: See the link bellow, this is default style of a button, you can copy/paste the Template part and modify it as you want. (You need to play with different visual states)
http://msdn.microsoft.com/en-us/library/cc278069(v=vs.95).aspx