Change TextBlock foreground color on Mouseover in GridView - windows-8

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.

Related

Main Activity Support Action Bar Buttons

I'm in Kotlin using the default Action Bar in the main activity:
setSupportActionBar(binding.toolbar)
I see that there are several elements controlling the color of the Title, it's background, the toolbar background and the buttons on the bar. There must be a way to set the entire toolbar one color and the buttons another color. I'm using styling and XML and code to set a lot of colors elsewhere for day/night modes but I can't change the colors of these buttons. Code takes precedence over all and so I prefer Kotlin code. But it doesn't cover everything like the styling XML code does.
EDIT by author August 18, 2022:
Possibly last comment here because this is not possible. One writer here in SO admitted it was easier to build toolbars in each fragment with independent buttons than use the default main activity toolbar. I've done that with success and in adding the ability to slide between fragments but that is not what I think the compiler designers would have hoped for.
With the main activity toolbar, the buttons come from vector assets with their own XML files. If the fill color is changed in those files with this:
android:tint="?attr/colorControlNormal
and this in for example a night theme:
<item name="android:colorControlNormal">#color/yellow_text</item>
I can't get the colors in a button to change at all.
It's the same as in checkbox properties where the background of the checkbox background is tied to the background of the actual background of the "form" itself showing as a page (the main activity and fragment) on an Android. I can't change the background color of the tick mark in the checkbox either. A default seems to be taking over in the day/night themes.

Fluent UI React Changing the focus outline color to primary inverted color

I'm rendering a CommandButton with only an icon inside a container with a dark background with gradient and I have set the background color of the button to be transparent. (Note that it is transparent because the container's background color has a gradient.)
The problem I have is that since the default focus outline for the button is black and it's not visible against the dark background. How can I change this so that the focus outline becomes the invert color of the primary color?
I can always attach a custom CSS to change the outline color, but I'm looking for the correct way supported by the Fluent UI framework. I noticed that the Button component puts a white background color when the primary=true prop is specified. So, there seems to be a way to change the outline color, but I could not really figure out how. I also looked into the source code, and it takes a theme object and generates a class name, but this still did not tell me the full story.
There are sometimes ::after selectors in play with FluentUI focus behavior. The "Chrome version >= 86" portion of this answer shows how to put Chrome in a state that will yet you inspect your components without losing focus in the page when you navigate in DevTools.
When I encounter focus styling that I want to change in Fluent, I can find out what's applying the styles I wish to alter using this method and then override them.

XAML AppBarButton Hover Colors

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

background scrolling together with content

I have a form with an A4 image in the background (a standard questionaire). on that form i have textfields to fill. But if we scroll to the bottom of the form, the textfields scroll, but the background does not. How to fix the background to stick with the texfields ? VB.NET visual studio 2010.
Place a panel on the Form.
Place all your controls inside the panel.
Set the Background of the panel to your image.
Size your panel so that it is large enough to hold all the controls.
Place the panel at 0,0
Set the Form to AutoScroll

Yosemite Toolbar Style

How do I get the new toolbar item style of OSX Yosemite?
I created a standard toolbar, but the buttons don't have that button-like look. Do I need to drag actual buttons to the toolbar to get this look?
What I have:
What I want (that round bezel and white background):
There are two types of items in toolbars, image items and view items. It looks like you have an image item. You seem to want a view item where the view is an NSButton configured as a round textured button. So, yes, you should drag actual buttons to the toolbar.
I would not attempt to control the button background. You should use the button as-is to get the default system appearance. Apple recommends using a PDF template image (all black with the alpha channel used to make the image). The button itself would not have a title/label. Rather that would be on the containing toolbar item.
It looks like you may have applied an internal blue "glow" or highlight to your image. Generally, you should not do that. Let the frameworks apply appropriate effects to the template image automatically based on the button state and shows-state-by mode.
Toolbars in the Human Interface Guidelines
Controls which are appropriate to use in the window frame (including the toolbar)
Designing images for toolbar buttons
Works just fine for my Cocoa app under Yosemite -
are you actually setting the template property for your icon images..?
From the NSImage docs:
The 'template' property is metadata that allows clients to be smarter
about image processing. An image should be marked as a template if it
is basic glpyh-like black and white art that is intended to be
processed into derived images for use on screen.