Change Foreground of ReadOnly TextBox - xaml

In my Windows Phone App I want to have a TextBox which must be readOnly, but this makes its Foreground color look grayish, I want the Foreground color to be black, Is that possible?
Or how else can I have a textblock with black font, but not editable by the user?

You can change the Style of your TextBox for the disabled state.
To achieve this more easily, you can open your .xaml document in Expression Blend, Right Click in your TextBox -> Edit Template... -> Edit a Copy.
Then you choose the name you want for your Style.
After that search for the States Tab, and click it. After that choose the disabled state.
Then you can edit the TextBox to be whatever you like for the disabled state.

Also you can just set TextBox Style to null, and set Foreground as usual.

Related

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

Transparent Tabpage to show Desktop (wallpaper and Icons)

With winforms, you can set Transparency of a form via setting up the TransparencyKey and the Backcolor of the form into the same color in the properties window.
However, the tabpages in the TabControl doesn't have these properties.
How will I make it so that a tabpage will show the desktop's contents?
Also, is there a way for me to show the icons in my desktop on the tabpage? The icons must still function as normal(can be double clicked to open the file, single clicked to rename and can be dragged around inside my tabpage.)
I am using VB.NET 2005. Any direction is greatly appreciated.
Apparantly, the answer is quite simple.
Just set the TransparencyKey of a form to a color that you wish to appear as transparent, then set the backcolor of the tabpage to that color (the color you've set on your form).

How to create a display mode and edit mode in a Metro App?

What is the best approach to change TextBlocks to TextBoxes after clicking on Edit button for a Windows 8 Store App? This is something similar to an iOS app that after clicking on an Edit button editable fields become TextBoxes and you can then change data.
You don't need to use TextBlock just use TextBox with IsReadOnly property.
on button click mark the IsReadOnly="True"
I think you want the IsReadOnly property. IsReadOnly=true; when you don't want to let them edit the textbox, IsReadOnly=false; when you want to let them edit it.

Change background of Metro TextBox at normal state

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.

Windows phone 7: button click, background and text-color, why?

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