Converters are one of the most significant killers of performance (second perhaps to binding itself) in a XAML application.
You could use the following code snippet to get a list of all system colors in C#. This is a quick and handy way of getting lots of data quickly. 🙂 The function returns a Dictionary with Name and Color values for all the System.Colors.
There is no built in function to get the query parameters of a URL as a name, value dictionary which can be accessed easily. So you could use this extension function to get the query parameters. Now this extension function can be used just like another primitive function.
To detect when Battery Saver is enabled you must check the PowerManager.PowerSavingModeEnabled property. Because this property is only available for devices running Windows Phone 8 Update 3, you must access this property via reflection after checking the device OS version. The following example shows you how to detect if Battery Saver is currently enabled.
Sometimes you need to restrict the input to two decimal places in C#. The following function returns true if the input is valid, otherwise it returns false. You will need to listen to a Key_Down event handler for your TextBox and put the following code in it. Setting e.handled to true prevents the current character […]
This method is ugly but it works. The key part is IsTabStop property. If I don’t touch it – the keyboard disappers for a fraction of a second and reapears again. Makes virtual keyboard disappear when user taps enter key. You just need to call the LostFocus method and pass the name of the TextBox […]
Students can get verified and download free softwares through their dreamspark accounts. Here’s how you can get yourself verified. Visit: https://www.msacademicverify.com/AVE/Verify/NewDefault.aspx?lc=1033&wa=wsignin1.0 There are various ways to get verified. Using a college/school email id: A email id issued by your school/college with .edu domain School account Using a International Student Identity card Using a verification code: […]
While migrating your project to Windows Phone 8.1 you will find that TextBlockButtonStyle style is missing. You can add it yourself in App.xaml. Now you can just do Remember it will be in the “Local Resources” instead of the System Resources.
Dictionary<TKey, TValue> provide fast lookups, based on keys, to get values. With them, we use keys and values of any type, including int and string. Dictionary is used with different elements. We specify its key type and its value type (string, int). Define a Dictionary We specify its key type and its value type (string, […]