Making TextBox text theme aware - windows-phone-7

I created a page.i want to change the background of Textbox when theme of emulator is changed to light.The letters cant be visible while changing the themes.is there any solution?

If you use the default TextBox control inside Visual Studio it is fully theme aware. If you have set the colours yourself then you need to perform the theme aware changes in code behind.
For more information, please see the following :-
http://www.developer.nokia.com/Community/Wiki/ThemeawareWindowsPhoneapplication

I assume you are referring to TextBlock rather than TextBox (as the latter automatically has style support).
You should never declare a TextBlock without a Style attribute, such as Style={StaticResource PhoneTextNormalStyle}. A full list of available styles can be found on MSDN: Theme Resources for Windows Phone
Also of relevance is: How to: Apply Theme Resources for Windows Phone
NB: Due to the way Mango was designed, backing into your application after changing themes will not apply the new theme. You will need to restart the application to see the changed theme.
Update
Based on your screenshots, you have two choices:
Reskin ("Edit Template" in Blend) each of the controls that you use to redefine a style in which the various colour-related properties are hardcoded
Use an alternate, lighter, background image when in the white theme in order to improve the contrast. I've blogged about how you can define theme-aware resources (and also mentioned it on other SO questions).
Put simply, you can either submit to the theme or force it to remain the way you want it.

We can set a theme as default to our application.When we log in our application the phone theme will be changed to its suitable theme and when we log out change back to original
here s the link .

Related

Change context style menu windows 10

I managed to interpret a mmstyles file through a tool called "msstylesEditor" but I can't find where I can modify the values for the background and font color of the context menu.
Also if anyone could link me to some tutorials on how to make theme like those found on DeviantArt i'd be glad ! I couldn't find anything !
Here is how msstylesEditor looks
The background can be changed under Menu -> POPUPBACKGROUND. This is an image (1x1px). You have to export it, change its color, then replace the old image.
You also might want to look at the POPUPBORDER and POPUPITEM parts, in order to fully change the menus appearance. I havent verified where the font color is located, but i guess its the TEXTCOLOR properties
of the just stated parts.
The aim of the tool you linked, is mainly to modify existing themes. The styles on DeviantArt are probably made using a (commercial) tool called "Windows Style Builder".

Change app theme on user input from dark to light and vice versa in Windows Phone

I am developing an application, where I need to give user an option to change theme of app at any point of time through settings from dark to light and vice versa and can switch the theme at any time.
Please let me know if there is a way to do it.
Currently the app changes theme according to OS theme. If user has dark theme selected in OS, app will have dark theme and vice versa.
Requirement is irrespective of OS theme user should be able to change theme inside application (Like in Google Mail/ VLC player settings etc.)
Please help me out in implementing this.
If you made the application switch with the OS Theme by using the global resource keys for colors, icons and brushes you would have to replace all of that; as far as I know there is no way to intercept that.
To have the application switch between themes you could define a property on the main viewmodel that can be accessed and bound to from anywhere. Put all the colors and resources you want to theme in a ViewModel and bind to these properties. Next create some value converters to turn a general resource reference into a themed resource reference. That will allow you to specify a color by a logical name and have the converter translate it to a theme aware color:
<Text Background="{Binding Path=UIResources.TextBackground,
Converter={StaticResource ColorToThemedColor}}" />
You could bind the RequestedTheme of your pages to a bool-Value.
Then write a value-converter, which returns Light or Dark for true/false, an set it as Page-Resource.
Last you have write a static Property, to save the value through navigation.
Initialize the static value on start up, and every constructor of you viewmodel get's the value at sets the isLight-Property on the Page
<Page RequestedTheme={Binding isLight,Converter={Staticresource TruetoLightConverter}>

Why are icons in property sheets rendered with so few colors?

I am creating a property sheet shell extension and want to have a little icon to set off my property tab from the standard system tabs. Unfortunately, my icon is being rendered almost entirely in grey.
Original image:
In the property sheet tab:
At first I thought this was somehow my problem, but then I saw that TortoiseSVN appears to have the same problem:
This happens in both Windows 7 and Windows 8.
Does anyone know why these images are appearing so muted? Also, does anyone have any hints on how to make the icon look good in spite of this colorlessness?
The PropertySheet function initialises its tab control with a 16 color (ILC_COLOR) ImageList and copies the supplied icon for each page into it. There doesn't seem to be a way to override this and supply your own ImageList (or to specify the bit depth of the created ImageList). Presumably this is a legacy of the original Windows 95 code that never got updated as things moved on.
Instead of Property Sheets, you can use Tab Control, which makes tabs management more flexible and clear. And of course you can use any type of icons, because you have to create your own ImageList.
Here you can read about Tab Controls:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb760548(v=vs.85).aspx
And here you can access example usage of Tab Controls:
Icons in Win32 Property Pages are ugly - 4 bit icons

How to prevent Theme Resources for Windows Phone

I'm trying to avoid applying WP7's scheme settings to the UI in my application.
What should i do to make my UI elements that are in disabled, accented states are independent from theme switching?
Regards.
Apparently you need to create your own custom theme.
Here is a quote from http://windowsphonegeek.com/articles/Windows-Phone-Mango-Custom-application-Theme-Step-by-Step:
"Creating a custom application theme is a good solution when you want your application to look in the same way in all themes i.e. to be theme independent. "

set default fonts, shapes, etc in powerpoint through registry, not themes

I apologize, this may sound like it has been asked before, but the answers I found do not seem to work in my case.
Is there a way to set the default powerpoint options (fonts, shapes, colors, fills, thicknesses etc) in the registry options, rather than jumping through hoops (saving a default theme via Slidemaster, which is the current way suggested my MS). I find that each time I manage to set my own default theme to propagate across all newly created PPTX files, Microsoft finds a way to enforce its default themes. The current recommended method of creating a default theme through SlideMaster only seems to work when I do file_new_custom theme, and set that as a default. But it does not seem to work for 'blank presentation', and for creating a new file with *pptx extension outside of PowerPoint. Actually, I would much prefer if the entire theme selection window never appeared, all I need is a blank white screen, with the settings I know and like.
Thank you in advance!
Is there a way to set the default powerpoint options (fonts, shapes, colors, fills, thicknesses etc) in the registry option
No. These are all "presentation-level" defaults, not "application-level". They travel with and can be different for each PPTX file or template/theme file.
What you can do is create your own default presentation, the one you get when you choose new blank presentation. I've got an article about this on the PPT FAQ site I maintain:
Create a default "blank" presentation with your own defaults
http://www.pptfaq.com/FAQ00245_Create_a_default_-blank-_presentation_with_your_own_defaults.htm
You'll also want to read this:
Set default text and drawing shape styles
http://www.pptfaq.com/FAQ00039_Set_default_text_and_drawing_shape_styles.htm
If that still leaves questions, post back (and please indicate the version of Office you have ... e.g. Windows Office 365 or whatever ... platform and version. It matters.)

Resources