Hi,
When i started with the silverlight coding i always used dispatcher timer for creating simple animation as it was something familiar to me. and i was always trying to sort out the difference between the two.
After some research and goggling i found my approach is wrong.
Its always better to use storyboard for creating animation and effects of all kind.
The advantages of using story board are
1.The StoryBoard is handled in separate thread.
2.The Dispatcher Timer is a lower resolution timer than the timer behind the Storyboard class, which causes loss in fidelity.
3.The Storyboard execution is more stable across the different supported OS’s and web browsers.
Regards
Balu
Friday, April 30, 2010
Monday, January 11, 2010
Selct a folder in WPF
Hi
I had a requirement to select the destination folder in WPF. I couldn't find any direct method.After bit of searching i found a method in Schwartz blog.
here the way where u can select the folder using openfiledialog
OpenFileDialog ofd = new OpenFileDialog();
ofd.CheckFileExists = false;
ofd.CheckPathExists = false;
ofd.Multiselect = false;
ofd.FileName = "(Get Folder)";
ofd.Filter = "Folders only|*.FOLDER";
ofd.ShowDialog();
string destinationFolder = ofd.FileName.Substring(0, ofd.FileName.Length - 19);
hope it helps.
Regards
balu
I had a requirement to select the destination folder in WPF. I couldn't find any direct method.After bit of searching i found a method in Schwartz blog.
here the way where u can select the folder using openfiledialog
OpenFileDialog ofd = new OpenFileDialog();
ofd.CheckFileExists = false;
ofd.CheckPathExists = false;
ofd.Multiselect = false;
ofd.FileName = "(Get Folder)";
ofd.Filter = "Folders only|*.FOLDER";
ofd.ShowDialog();
string destinationFolder = ofd.FileName.Substring(0, ofd.FileName.Length - 19);
hope it helps.
Regards
balu
Friday, January 8, 2010
Silverlight in php
Silverlight in PHP
My goal was to make a silverlight aplication work in a PHP page.
Silverlight content embedded into an PHP(HTML/aspx) web page is transferred to the client browser and is then displayed by the
Silverlight runtime (plugin) installed on the client computer.
The most important thing is that the web server environment can be Linux/Apache, Windows/Apache or Windows/IIS.
First i created a sample silverlight application.And i made the .xap file(SLPHPtest.xap).
Now copy this SLPHPtest.xap file to the same directory within your web site where you plan to host the Silverlight content.
Now Open and edit the page which will host the Silverlight control by adding the following code: You need to add the silverlight refernce here.
And the code to download the the plugin if plugin is not presnet
< id="SilverlightControlHost"> id="SilverlightControlHost">
< object type="application/x-silverlight-2" data="data:application/x-silverlight-2," width="500" height="300">
< param name="source" value="SLPHPtest.xap">
<t param name="minRuntimeVersion" value="2.0.31005.0">
< param name="autoUpgrade" value="true">
< a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;" >
< img src="http://go.microsoft.com/fwlink/?LinkID=108181" alt="Get Microsoft Silverlight" style="border-style:none;" />
< /a>
< /object >
< /div >
< /div >
When you view the webpage(index.php) in a web browser the silverlight component can be viewed.Its as simple as that.
If you need to use multiple silverlight components just specify the corresponding .xap file and postion it as we need.
My goal was to make a silverlight aplication work in a PHP page.
Silverlight content embedded into an PHP(HTML/aspx) web page is transferred to the client browser and is then displayed by the
Silverlight runtime (plugin) installed on the client computer.
The most important thing is that the web server environment can be Linux/Apache, Windows/Apache or Windows/IIS.
First i created a sample silverlight application.And i made the .xap file(SLPHPtest.xap).
Now copy this SLPHPtest.xap file to the same directory within your web site where you plan to host the Silverlight content.
Now Open and edit the page which will host the Silverlight control by adding the following code: You need to add the silverlight refernce here.
And the code to download the the plugin if plugin is not presnet
< id="SilverlightControlHost"> id="SilverlightControlHost">
< object type="application/x-silverlight-2" data="data:application/x-silverlight-2," width="500" height="300">
< param name="source" value="SLPHPtest.xap">
<t param name="minRuntimeVersion" value="2.0.31005.0">
< param name="autoUpgrade" value="true">
< a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;" >
< img src="http://go.microsoft.com/fwlink/?LinkID=108181" alt="Get Microsoft Silverlight" style="border-style:none;" />
< /a>
< /object >
< /div >
< /div >
When you view the webpage(index.php) in a web browser the silverlight component can be viewed.Its as simple as that.
If you need to use multiple silverlight components just specify the corresponding .xap file and postion it as we need.
Subscribe to:
Posts (Atom)