XAML Theme Brushes - Switching Dynamically, cursor doesn't change - xaml

First Off, I found this extremely useful page on theme brushes:
http://metro.excastle.com/xaml-system-brushes
So Roughly, on startup for WinRT/XAML I am setting my theme brush for a textbox in a stylesheet:
Foreground = TextBoxDisabledForegroundThemeBrush
Background = TextBoxDisabledBackgroundThemeBrush
Which at run time makes the textbox appear as: white border, transparent background and grey text. Which I was hoping it would make it transparent, white border and white text.
On my Tapped event, I change the textbox to:
Foreground = TextBoxButtonPressedForegroundThemeBrush
Background = TextBoxButtonPressedForegroundThemeBrush
Which is supposed to be black background, white text and white border. Which seems right, but the cursor is back and you cannot see it.
First question is, am I doing this right to change my text color? I want to change the textbox so once it is selected it stays a changed color. I think this is correct. But I am not sure if I should be setting Foreground or maybe a Font Style instead?

Unfortunately you can't change caret color so if you want your TextBox editable - you should keep the background white or otherwise light. Otherwise, controlling the look of your control in its various states is best done using VisualStateManager and that is easiest to manipulate using Blend.

Related

Filling in Hollow Area Only for Bootstrap Glyphicon

I'm using Bootstrap glyphicons for a web app and love the flexibility of being able to leverage them as fonts, since that's what they are, not graphics. However, I'm running into a challenge with the glyphicon-remove-sign icon, which has a colored circle surrounding an otherwise empty "x". I like the default look of the black surrounding the "x" and want to use it to close a rounded-cornered iframe. But, because that "x" is empty, it displays whatever is behind it:
Ideally, I'd want to have that hollow "x" be a different color like white, easy enough to do with background colors, except that creates a box around the otherwise vectored font and looks unsightly for my usage, which has multiple colors to contend with behind the icon:
The question is: is there a way to just fill in the empty space inside the hollow area of this glyphicon without this kludgy-looking box? I looked at using a clip-path with the background color, but that won't work with IE. I welcome any recommendations anyone may have for a fix here -- thanks in advance.
create a wrapper div of the glyphicon, give it border-radius as to imitate the circle streching it and then give that background color

How to change DateTimePicker border color in VB .NET

Is there any easy way to change the border of DateTimePicker Control ? I want it to have a LightGray border to match my application theme. I also tried DateTimeInput control of DotNetBar, it has an option to change border color, but the DropDownButton in it has LightBlue theme. I have also tried adding an image to that button but it doesn't covers up whole button, the blue sides of the buttons are still visible.

photoshop foreground color of image cant be changed

I clicked on the foreground/background little square tool icons, selected the color I want and clicked ok. The small tool icon is showing the new color but the image itself hasn't changed the color. And yes confirmed that the mode is RGB.
You need to use a tool to apply the color as needed...
Did you use the paint bucket or brush to actually add the new color to the image?
Simply changing the color of this box does not change the foreground background color automatically

WP8 PhoneAccentBrush doesn't affect TextBox focus border

I'm trying to make my WP7 app work well on WP8 (by compiling it as a WP8 app).
In my app, I'm changing the PhoneAccentBrush's Color which seems to work fine still, however TextBox's in WP8 now seem to show a border around it when the textbox is in focus (this wasn't happening for me on WP7). This border seems to always use the System's accent color instead of using the changed color like every other control.
Any idea what's going on here and how to change it? The red accent (if that's what the user has chosen) really clashes with my app's colors!
I would call overriding the accent color a hack. I would avoid setting the accent color and create a template for your textBlock.
Blend makes this very easy by allowing you to copy the default template and make changes to it.
Right Click the textBox in the Objects and Timeline pane, then select Edit Template -> Edit Current. Then select the States tab and select the Focused FocusState, then edit the border brush. Save and reuse the template as needed.
I did notice the textBox control template has changed in 8 and now defines the focus state border brush, although it does default to the PhoneAccentBrush.

Background color of a Gtk.TextView - can't see selection

I successfully changed the background color of a Gtk.TextView (GTK3) with method override_background_color:
color.parse(self.settings.get_string("bgcolor"))
self.ui.NoteView.override_background_color(Gtk.StateType.NORMAL,color)
I also override the foreground color.
Unfortunatelly in that case making a selection in the text is invisible.
How can I modify the background and foreground color of a TextView without loosing the visible text selecting?
It's best to format the text in a GtkTextView by using GtkTextTags. You can apply any sort of text formatting(background & foreground colors, font, size, weight, etc..) to any portion of the text.
Click here for an example.
Hope that helps!
By the way, what you're doing is changing the style of your TextView. In Gtk it's best to stay away from doing this, especially if you aren't in a controlled environment or plan on releasing your software for others to use, because gtk's philosophy is to leave the styling and theming up to the end user for their own personal touches/needs.
This is why you are getting some unwanted results by overriding style colors.
In terms of a GtkTextView it does however offer simple formatting of the text(even support for adding images/widgets) via use of GtkTextTags as the link shows above.