Lets see how to convert a Desktop WPF application in a Web Application. I am using VS 2005 for this.
First of all we need to go the the project properties, and click on the “Signing” button in the left side. Mark the checkbox labeled “Sing the ClickOne manifests” and click the “Create Test Certificate” button.
After that, go through all your .xaml and .xaml.cs Windows and change Window for Page either in the xaml and extending from
System.Windows.Controls.Page in the partial class.
Now save everything and open the solution file (.cs.prof file) with an ascii text editor and add this lines in the first PropertyGroup:

<ApplicationExtension>.xbap</ApplicationExtension>
<MinFrameworkVersionRequired>3.0</MinFrameworkVersionRequired>
<HostInBrowser>True</HostInBrowser>
<Install>false</Install>
<MapFileExtensions>false</MapFileExtensions>
<IsWebBootstrapper>true</IsWebBootstrapper>
<BootstrapperEnabled>true</BootstrapperEnabled>
<PublishUrl>Publish\</PublishUrl>
<StartArguments>-debug "$(MSBuildProjectDirectory)\bin\
$(Configuration)\
$(AssemblyName)$(ApplicationExtension)"</StartArguments>
<StartAction>Program</StartAction>
<StartProgram>$(WINDIR)\System32\PresentationHost.exe</StartProgram>

The folowing tags should be within the file as well but they should be autogenerated:

<OutputType>winexe</OutputType>
<SignManifests>true</SignManifests>
<SignAssembly>false</SignAssembly>
<ManifestCertificateThumbprint> SOMETHING <
/ManifestCertificateThumbprint>
<ManifestKeyFile> SOMETHING_TemporaryKey.pfx</ManifestKeyFile>
<GenerateManifests>true</GenerateManifests>