Friday, December 14, 2012

Copy to clipboard function


For VB:

Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs)
        Clipboard.SetText(TextBox1.Text)
    End Sub

For C#:

private void button1_Click(object sender, RoutedEventArgs e)
        {
            Clipboard.SetText(this.textBox1.Text);
        }



Sunday, December 9, 2012

Image hyperlink clickable

In XAML:


<Image Height="127" HorizontalAlignment="Left" Margin="31,476,0,0" Name="image1"  Stretch="Fill" VerticalAlignment="Top" Width="396" Source="/img/banner2.png" Grid.ColumnSpan="2">
                        <toolkit:GestureService.GestureListener>
                            <toolkit:GestureListener Tap="GestureListener_Tap_1"/>
                        </toolkit:GestureService.GestureListener>
                    </Image>

In Coding:


private void GestureListener_Tap_1(object sender, Microsoft.Phone.Controls.GestureEventArgs e)
        {
            WebBrowserTask wbt = new WebBrowserTask();
            wbt.Uri = new Uri("http://www.khmertype.org", UriKind.Absolute);
            wbt.Show();

        }

Sunday, September 9, 2012

Windows Phone 8 SDK Preview opens for applications Sept. 12

In June we provided an early look at some developer features of Windows Phone 8, promising to share the Software Development Kit (SDK) in late summer. Select partners and developers have already seen early builds of the new SDK, helping to test the new toolset and get started on Windows Phone 8 apps.

Today I’m happy to announce that the time has come to make the near-final kit available to more developers through the Windows Phone 8 SDK Preview Program. Next Wednesday I’ll share detailed instructions on how current Windows Phone developers with published apps can apply. But I do want to set your expectations that program access will be limited.

The full Windows Phone 8 SDK will be made publically available later this year when we unveil Windows Phone 8. Until then, we believe this program offers more published developers a way to explore the SDK and get started on the next wave of amazing Windows Phone apps.

Look for more details Wednesday, September 12.

Finally, if you watched Nokia unveil its new Windows Phone 8 handsets in New York City today—the Lumia 820 and 920—you probably saw the on-stage demo of some new Windows Phone 8 camera APIs and a feature we call Lenses. Watch for additional info about how you can create your own Lenses in the coming weeks.

Windows Phone 8 SDK Preview opens for applications Sept. 12

In June we provided an early look at some developer features of Windows Phone 8, promising to share the Software Development Kit (SDK) in late summer. Select partners and developers have already seen early builds of the new SDK, helping to test the new toolset and get started on Windows Phone 8 apps.

Today I’m happy to announce that the time has come to make the near-final kit available to more developers through the Windows Phone 8 SDK Preview Program. Next Wednesday I’ll share detailed instructions on how current Windows Phone developers with published apps can apply. But I do want to set your expectations that program access will be limited.

The full Windows Phone 8 SDK will be made publically available later this year when we unveil Windows Phone 8. Until then, we believe this program offers more published developers a way to explore the SDK and get started on the next wave of amazing Windows Phone apps.

Look for more details Wednesday, September 12.

Finally, if you watched Nokia unveil its new Windows Phone 8 handsets in New York City today—the Lumia 820 and 920—you probably saw the on-stage demo of some new Windows Phone 8 camera APIs and a feature we call Lenses. Watch for additional info about how you can create your own Lenses in the coming weeks.

Saturday, August 25, 2012

Application bar for Windows Phone 7

There is a silly habit, which came with the experience in creating Windows and Web applications, the creation of interface elements in the application. You might be caught with this, creating an application for Windows Phone 7. For example, in one game application there are two buttons in the main window: Refresh and About. They look strange (especially About) and apparently superfluous. And everything goes well, until your application does not edit the fields, which initiate the call of keypad. And keypad is obscure part of the required buttons. Imagine an application that has the edit box on the whole screen, and in the bottom of the screen there are Send button, which allows to send a message. When entering text, the Send button will be hidden by a keyboard, and a novice user will be confused about what to do and how to get to the button. That's why, Windows Phone 7 applications have the ability to use a special control panel - Application Bar.
Application Bar is a pop-up panel at the bottom of the application window, which can contain from one to four buttons, which allow you to perform some action. In addition, non hierarchical text menu can be presented here. The menu can be linked to one of the buttons and the panel is mainly used to select one of the application options.
Application Bar can not be hidden by the keyboard or other elements, and when you call for it, it "shifts" the entire interface. However it happens, if the transparency is set 1. If transparency is set to less than 1, then the Application Bar begins to cover the screen, using the transparency effect.
So, let's create a simple Application Bar. The first thing to do is decide about the icons. Some icons are available in the folder C: \ Program Files (x86) \ Microsoft SDKs \ Windows Phone \ v7.0 \ Icons \ dark, and the rest you need to draw on your own. There are few recommendations about creating icons:
Icon is being painted in white on a transparent background. If you change the topic, this practice allows you to make the icon visible for the user.
The size of icon will be 48 by 48 pixels, but all that you have drawn, you need to fit into a rectangle 26 by 26 pixels and place the image in the center. The problem is that any image is enclosed in a circle with the radius 14. If your image is larger, intersections will appear.
Read more...

omnia 7 - apps automatically exit, and freeze the phone

Hello, I am Csaba Hungary, is a type omnia 7 my phone about a month of purchase calculated worked correctly, but then when I tried to 3G Internet, the phone automatically restarts. So I took the service (T-Mobile), software is updated it and gave it back. It also solved the problem, but instead became another problem. The phone automatically exits from any application without notice, including integrated applications (Internet Explorer, music player, Now) if I try to go back into it, then it back a few times, then suddenly stop responding and automatically restart the phone. So again I took the service and came back that they did nothing with it, because during the tests in principle with the phone had no problem ...
What is in their opinion of this?
sorry for my bad english :(
Any anwser?

Exit/Close app on Windows Phone


How to close application for Windows Phone quickly at once after browsing a few tasks?  Instead of pressing "back" a number of times. Do we have similar things like Task Manager back in WinMobile 6.5 for WinPh 7.5? So we know which apps running and switch off quickly.

The answer is:

Exit();


private void Exit()
        {
       while (NavigationService.BackStack.Any())
       NavigationService.RemoveBackEntry();
       NavigationService.GoBack();
        }