Need a soft/virtual keyboard on your Silverlight application? Check this out Virtual Input Keyboard & Behaviours for Silverlight by Orktane. Thanks to the author’s tremendous effort, the fully functional soft keyboard is supported in both Silverlight 3 and Silverlight 4.
Posted by yeejie
4/25/2010 4:03 PM |
I disabled commenting in my blog due to uncontrollable spams. However, thanks to Michael Ceranski, I just added captcha feature. Refer to his blog post for detailed steps on how to implement captcha for blogengine’s blogs.
For the past two weeks, I developed a prototype of Kiosk application using Silverlight 4. As Siverlight 4 is just newly released, I believe by sharing my experience as following will benefit the others. Let’s have a look into a few screenshots of the Kiosk application:
Check out and view orders page:
Payment page which leads to printing of confirmation receipt:
That’s all! Looks simple, however the implementation is not so easy. Let’s go through the implementation process in Problem/Solution format:
Problem #1: Design…Design….Design
"I can’t design. I’ not talented. The crappy design tool doesn’t work like what I expected". If you got the same experience, welcome to my “I hate design” club.
Solution: You just have to live with it
You do not need great design skill in order to design UI of Silverlight application. The only tool you will use and play with is Expression Blend (provided you have all the necessary graphic elements). Download "Getting Started: Create Silverlight Experiences with Expression Blend 3 Course" provided by Microsoft. Study and go through the tutorial examples. I assure you that even a developer can design a great UI using Expression Blend :).
Problem #2: Storing data in Silverlight
"I need to store and retrieve data in my Silverlight application. What are the possible ways?". From my experience, you can either 1) use XML for simple data storing 2) use sql database, access database using WCF RIA service. In my prototype, I was leveraging on XML to store data, thus I will not cover the latter way in this post.
Solution: Design XML. Use LINQ to XML for CRUD in your Silverlight application Problem #3: Dealing with listbox
First, design your XML. XML is W3C standard. A lot of tutorials are out there to teach you how to design it. You can use Xmlreader/Xmlwriter to read/write XML, but my advise is to use LINQ to XML. Refer to this tutorial post on how to use LINQ to XML in Silverlight: "Using LINQ to XML in Silverlight 2" by Martin Mihaylov.
Adding and removing items into/from listbox control is fairly simple. It can be done by using listbox1.Items.Add() and listbox1.Items.Remove() command respectively in your code. However, this may not be the best way if the listbox holds custom listboxitem.
Solution: Data binding Problem #4: Passing data/information across pages
Data binding is the right way to go. In my prototype, the Order listbox is data bind with a class. Refer to DataBinding & DataTemplates Using Expression Blend for detailed implementation.
Passing data and information from initial page to the next page always appears to be a challenge to developers. There are a few ways to achieve it: 1) use static class 2) leverage on navigation framework, URI mapper and parameter 3) assign data/information to any parent page’s element tag and retrieve it from child page.
Solution: Choose the best fit Problem #5: Out of Browser (OOB)
In my prototype implementation, I use static class to store data and passing it across the page. For parameterized information, I assign it to the parent page’s contentframe tag (my Silverlight project template is navigation application) and retrieve the information from my child page. The reason I’m not using the navigation URI method is due to parameter value can only be retrieved in the OnNavigatedTo() event. Therefore, if you need the parameter value in constructor event to initiate the page, navigation URI method is not appropriate.
My prototype needs to be deployed locally without hosting it in a web server.
Solution: Understand OOB
Check out Silverlight 3 OutOfBrowser(OOB) behind the scenes Explained for detailed explanation of how OOB works and the way to package and deploy your xap locally. However, please keep in mind that the method only works for deploying Silverlight application which without elevated permission. Elevated permission is a new feature in Silverlight 4, in shorts, it needs to be stored in Isolated Storage folder in order to run in elevated permission mode.
"Is there any simple way to deploy Silverlight application? Probably to an exe file…like flash application?". YES! Desklighter provides us the tool to create standalone windows application from Silverlight XAP file. Just a few clicks and it works like a charm. Million thanks to Desklighter for saving my time from writing deployment instructions. Problem #6: Printing with non-windows driver printer
If you develop kiosk or POS application before, you probably know that the printer used by kiosk or POS application doesn’t have a window-based driver. Generally the printer we use is called OPOS, or I call it com-based printer.
Solution: COM Interop (only in Silverlight 4)
Consider upgrading your solution to Silverlight 4 because only Silverlight 4 provides COM Interop feature. First, you need to register (regsvr32) the DLL/OCX you intend to call from your Silverlight application. Next, use the code example as shown as here to refer and call the COM component. I will follow up with the implementation of COM interop with OPOS printer in the next post.
Undoubtfully, Silverlight 4 has created a big buzz among .Net developers recently. In this post, I’m sharing a cool demo site that is created by Sina.com. Basically it’s a stock monitoring site. By developing with Silverlight 4, the site (which is now a full-fledged Silverlight application) gives a wonderful experience to the users (both technical and non-technicaL). Check the site out and you will understand the excitement:
Oh yeah…first and foremost, install Silverlight 4 RC, available at http://bit.ly/ddN6gK.
Posted by yeejie
2/19/2010 1:43 PM |
Do you have this script that is not running in IE8:
var mybtn = document.createElement("input");
If yes, try this instead:
mybtn.className = "finallyCSSworking";
Pasted from http://blah.winsmarts.com/2006-12-Backup-Restore_a_site_collection_in_SharePoint_2007.aspx
The best way to backup a SharePoint site is –
Stsadm –o backup –url <SiteURL> -filename <FileName>
For example: Stsadm –0 backup –url http://sharepoint:100 –filename c:\sharepoint100.bak
To restore the site, use
Stsadm –o restore –url <restoretoURL> -filename <filetorestorefrom>
For example: Stsadm –0 restore –url http://sharepointNEW:100 –filename c:\sharepoint100.bak
Few searches revealed that this id is corresponding to Publishing Timer Jobs. To install the feature, run the following command:
stsadm -o installfeature -name PublishingTimerJobs
Posted by yeejie
1/24/2010 9:54 AM |
The xsl:param instruction is just like xsl:variable with one important difference: its value is only treated as a default value and can be overridden at runtime.
Posted by yeejie
1/21/2010 4:51 AM |
<Pasted from http://blog.sqlauthority.com/2008/09/09/sql-server-error-fix-sharepoint-stop-working-after-changing-server-computer-name/>
If Microsoft Office SharePoint Server (MOSS) and your database (MS SQL Server) are running together on same physical server, changing the name of the server (computer) using operating system may create non-functional SharePoint website.
When you change the physical server name the SharePoint is already connected to the SQL instance of old computer name (OldServerName/SQLInstance) and on changing the name the SharePoint will not able to connect the SQL Server as now the SQL Server instance will run on new computer name (NewServerName/SQLInstance).
To solve this problem you need to reconfigure the entire Microsoft Office SharePoint Server with SQL Server Instance. Please follow the steps to fix the issue.
1. Open command prompt, change directory to where stsadm.exe exists.
C:\cd C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN
2. To invoke setconfigdb operation we need to use stsadm.exe. Run following command on command prompt
stsadm.exe -o setconfigdb -databaseserver ServerName -farmuser MyUserName – farmpassword MyPassword
3. Go to IIS, All Programs>>Administrative Tools>>Internet Information Service (IIS) Manager.
4. Right Click SharePoint Central Administration v3, click on delete and re-run the configuration wizard; the web application will be re-created by the configuration wizard.
5. After the above operation has completed successfully, run the SharePoint Products and Technologies Configuration Wizard.
All Programs>>Microsoft Office Server >> SharePoint Product and Technologies Configuration Wizard
6. Complete all the steps of wizard by clicking on Next button.
At the end of this process you will get a success wizard.
On completion of this whole procedure Microsoft Office SharePoint Server gets connected to the database with new Computer Name
Posted by yeejie
1/20/2010 11:01 AM |
It’s Wednesday morning, I got a shock when my engineers told me that they are not able to connect to Team Foundation Server. As usual, the best remedy of all time: RESTART the computer and server. However, it’s still not working. I still hit the error as mentioned above.
If you were in my situation, no panic :). Go to “IIS” of your TFS server, expand “Application Pools”, notice “Microsoft Team Foundation Server Application Pool”. Is it Stop or in Error mode? If yes, do the following and have your nice day:
Note the identity of your application pool. E.g.: Domain\TFSService. Go to “Active Directory Users and Computers” or “Local Users and Computers”, right-click and select Properties of that user, and check the “Password Never Expires” box. Now, restart your server or start the “error” application pool.
Thanks to Niraj for the guidance (http://nirajrules.spaces.live.com/blog/cns!12C5F7733841CB22!119.entry).