Saturday, November 10, 2012
Friday, October 19, 2012
Monday, May 14, 2012
PHP Note
Property and method scope of PHP
There are three scope keywords in PHP 5
There are three scope keywords in PHP 5
public: default
protected
private
They have the same features compare with other coding languages.
Tuesday, January 17, 2012
[WP]Playing video in the WebBrowser Control
If you want to play video in the WebBrowser control whose format is mp4, 3gp, etc...(whatever WP support playing), you may notice that the outside built-in IE browser already has the ability and works well.
The built-in IE can auto play video after you navigated the page or you can find a region and tap it to play video. Let's do it in our apps.
First, you need enable script since some playing actions wrote as script(e.g. javascript)
<phone:WebBrowser x:name="Browser" IsScriptenabled="True" Navigating="Browser_Navigating"/>
Second, write some code in the page's xaml.cs file.
private void Browser_Navigating(object sender, NavigatingEventArgs e)
{
if(Your condition for palying or not playing)
{
e.Cancel = true;
MediaPlayerLauncher mPlayer = new MediaPlayerLauncher();
mPlayer.Media = e.Uri;
mPlayer.Show();
}
}
Then you can see it works.Monday, January 9, 2012
[Silverlight]Attach Behavior in code
It's easy to attach Behavior in code.
Just do this
Just do this
LikeBehavior likeBehavior = new LikeBehavior(); likeBehavior.Attach(dependencyObject);Where LikeBehavior is a behavior.