Windows Phone 8 Style - windows-phone-8

I am developing a Windows Phone 8 application using xaml. I have almost finished my project. On testing I notice that the application theme color is changing when I change the phone's theme color via settings. I need red color theme for my application (button selection, textbox border,progressbar color etc). What should I do to maintain constant style irrespective of phone's theme? Should I add style for each and every component?

Just create new resource dictionary and include it in App.xaml (merge dictionaries). Override all default styles for all controls you'll be using. Now, use those styles for all your controls and you will be fine. Since your controls will pull styles from App.xaml, your application will be styled according to your desires.
You can find styles in C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\Design, this will give you an idea what to change. Or get some of styles with Expression Blend (edit template).

Related

Ionic3 - How to change color and size default tab bar

I'm using ionic 3 and angular. I want to change color and size of default tab bar in ionic, but when I modified main.css file, it can build success, but when I re-build, it seem return default status...
I don't know how to create new file css to change it.. How to can change new style of tab bar in ionic 3?
I'm so sorry because this is basic question, I'm a newbie
I am believing that you are asking for the tabs in ionic
It depends whether you are building for android or ios.
If you want to change for Android,
just add $tabs-md-background: color($colors, custom); in variable.scss file.
Where custom is your customized colour.
Similarly, you can change the size as well, depending on your phone os.

Changing the Accent Color in Windows Phone

How to set the active background color of the elements like button while clicking irrespective of the phone's current accent color?
There is a nice library for that in NuGet called Windows Phone Theme Manager. Type "theme manager" in the search box of NuGet manager window and you will find it.
Then all you have to do is add one line of code in App.xaml.cs file at the end of the constructor:
ThemeManager.SetAccentColor(AccentColor.Blue);
Blue is just an example. You can use any color.

Inconsistent default button behavior in WP8.1 Universal versus Silverlight 8.1 / Windows 8.1 / earlier

Why is the default button visual behavior on click different in Windows Phone 8.1 "universal" apps? Is there some way to restore it to the behavior consistent with all other versions of Windows Phone/Windows 8 or do I need to create a new custom control?
Windows Phone 7/8/8.1 Silverlight/Windows 8.1: Button background flashes a complementary color based on theme, button stays fixed.
Windows Phone 8.1 "universal": Button background doesn't change color, tilt effect is applied to the button displacing it based on where the user has touched it.
I'm a beginner developer with some experience in developing WP7/WP8 apps, trying to make my first universal app for WP8.1/Windows 8.1. I verified this behavior in VS2013 Update 2 RC with a new Windows Store App, new WP8.1 Silverlight app, new WP8.1 universal app and one of my existing WP8 apps by just creating a new button object in xaml. Appreciate any help!
In my own test, the button does change color to the PhoneAccentBrush resource.
But if you want to remove the tilt effect, you should just edit the style of the button. Since you claim to be a beginner, I'll explain how to easily change the style using VS2013. Maybe you don't know this yet.
Right-click your Button in the designer, goto Edit Template... on the menu, then select Edit a Copy...
This will generate the standard button style in your xaml which you can edit. FYI, this will change your document outline to the button style outline. (See Document Outline window in VS2013.) To go back to the page outline, click the up arrow icon at the top of the outline.
Anyways, find the < VisualState x:Name="Pressed"/ > line and then comment out the PointerDownThemeAnimation line.
Done!

Implementing color themes for my app

I'm developing a WP8 app, and I'm wondering what's the correct way to implement color themes for my app.
Currently, I'm changing the phone's theme resources described here, however I'm wondering, whether that has any side-effects I should know of?
For instance: if I change the color of PhoneBackgroundBrush, will that mean that I'll change the bg color of every app and the phone itself? Or, will the change be only current-app-wide?
I change theme resources like so:
(App.Current.Resources["PhoneBackgroundBrush"] as SolidColorBrush).Color = Colors.White;
Imagine the consequences if a single instance of these were shared across applications, you could do some real damage with something like that...
You're only changing the resource for the current app. You're sandboxed and safe
The Code that you used
(App.Current.Resources["PhoneBackgroundBrush"] as SolidColorBrush).Color = Colors.White;
Will change the default color of the pages and controls of your app. Not any other app .
These settings get applied to the Application when it is activated. So every app by default has a PhoneBackgroundBrush which is the default theme for the Phone.
But if your app contains Multiple pages with different color then it is always favorable to go by individual Grid
<Grid x:Name="LayoutRoot" Background="Red"></Grid>
Along with providing
App.Current.Resources["PhoneBackgroundBrush"] as SolidColorBrush).Color = Colors.White
For a common application background color :)
All the Properties mentioned in Themes for windows phone
are meant for a particular application. And you can select any of the following for a global application background color/theme from them.

Set background color on splashscreen and tiles for Windows Store Applications

I don't want to use the default grey backgruond color for my Splashscreen and Tile backgrounds. Where can I change this in Visual Studio?
Opening the "package.appxmanifest" file in your Solution Explorer will get you there as well :)
Just realize that this is done in the menu Project / Store / Edit App Manifest, and set the "Background color".