Thursday, December 20, 2012
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();
}
<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();
}
Subscribe to:
Posts (Atom)