Category: C#

How to Detect Windows Phone OS version using C#?

The Windows Phone SDK provides the Environment.OSVersion property which can be used to detect the version of the Operating System uses in Windows Phone (Windows Phone 8 / Windows Phone 7). Below is a code snippet that demonstrates how to detect the Windows Phone OS Version using C#. How to Detect Windows Phone OS version using C#?

C# Compiler Error – CS1069 the type name ‘{0}’ could not be found i

In this blog post, you’ll learn more about the C# Compiler Error – CS1069 and the related message description C# Compiler Error Code CS1069 C# Compiler Description for the Code :CS1069 The type name ‘{0}’ could not be found in the namespace ‘{1}’. This type has been forwarded to assembly ‘{2}’ Consider adding a reference to that assembly.

C# Compiler Warning – CS8512 the name ‘‘ refers to the constant, not

In this blog post, you’ll learn more about the C# Compiler Warning – CS8512 and the related message description C# Compiler Warning Code CS8512 C# Compiler Description for the Code :CS8512 The name ‘‘ refers to the constant, not the discard pattern. Use ‘var ‘ to discard the value, or ‘@_’ to refer to a constant by that name.

C# Compiler Warning – CS7081 the callermembernameattribute applied to

In this blog post, you’ll learn more about the C# Compiler Warning – CS7081 and the related message description C# Compiler Warning Code CS7081 C# Compiler Description for the Code :CS7081 The CallerMemberNameAttribute applied to parameter ‘{0}’ will have no effect. It is overridden by the CallerLineNumberAttribute.

C# Compiler Error – CS7029 friend access was granted by ‘{0}’, but

In this blog post, you’ll learn more about the C# Compiler Error – CS7029 and the related message description C# Compiler Error Code CS7029 C# Compiler Description for the Code :CS7029 Friend access was granted by ‘{0}’, but the strong name signing state of the output assembly does not match that of the granting assembly.

Preventing the Orientation from being changed in Windows Phone App

The PhoneApplicationPage has the property Supported Orientation which is used to restrict the orientation of the page in a Windows Phone App. It accepts the values Portrait Landscape PortraitOrLandScape How to Prevent the Orientation from being changed in Windows Phone App? Setting the Supported Orientation to Portrait, Landscape will restrict the orientation from being changed when the windows phone device is rotated. If the Supported…

How to Navigate from One Page to Another in Windows Phone 8 using Hyperlink Button?

Below is a sample code snippet demonstrating how to navigate from a page to another in Windows Phone 8 using Hyperlink Button. How to Navigate from One Page to Another in Windows Phone 8 using Hyperlink Button? Assume that the current page in “MainPage.xaml” and the “ACCode.xaml” is the destination page. One can use the code XAML <HyperlinkButton Content=”GoToAC” NavigateUri=”/ACCode.xaml” HorizontalAlignment=”Left” Margin=”73,292,0,0″ VerticalAlignment=”Top” Height=”57″ Width=”244″…