Silverlight
The always informative Mike Taulty gave an excellent talk at the UK Silverlight User Group in London on Thursday, called "No Silverlight Application is an Island". I often looks at Mike's video synopsis and think that I have that all covered, but then he nearly always throws in something that is surprising and useful. The video is available here: http://blogs.conchango.com/michelleflynn/archive/2008/08/18/silverlight-user-group-2.aspx Cheers Ian Technorati Tags: Silverlight
If you have used the Deep Zoom Composer to generate a Silverlight project, then one thing you may notice is that your users can zoom out so far that they can't see anything! It is actually quite easy to lose the image completely and not be able to get back to seeing anything. Alternatively you may want to restrict how far they can zoom in too, so they don't start to see "blocky" images. A simple fix for this is to modify the Zoom method in Page.Xaml.cs with the following: public void Zoom(double zoom, Point pointToZoom)
...
I have been doing a lot of work with this wrapper (called VIEWS, and available here: http://codeplex.com/views) - it really makes life a lot easier for working with VE in Silverlight, and will no doubt point the way towards how the final Silverlight VE control will work. I recommend checking it out, and watching this intro video from Jared Bienz is a good start Virtual Earth Mapping in Silverlight with VIEWS Cheers Ian Technorati Tags: Silverlight,Virtual Earth
Keep getting this error on a Silverlight 2 B2 project that is referencing a WCF service in a Web Site (not web project). There doesn't seem to be any reason for it, and it happens intermittently, however the workaround I have for it currently is to simple open up the cs class for the service and make any edit (e.g. just add a comment line) and then build. This seems to fix it for a while. Hope there is a better solution long term, or a fix for this somewhere... Ian Technorati Tags: Wcf,Silverlight
http://theamazingalbumcoveratlas.org/ The excellent Word Magazine recently created an album cover atlas which shows locations of famous album covers. Cool idea, but I didn't like the basic google maps interface. So as an exercise and to also help spike out some work we are doing on www.lovecleanstreets.org I created a quick Virtual Earth and Silverlight version that make use of the VIEWS VE managed wrapper for Silverlight. Luckily the original developer, Ian Reeves used a REST service to get the data, so I was able to work with the same live data for my project. There was no...
For security reasons, the Silverlight version 2 runtime restricts access to certain classes of URLs from the WebClient and HTTP classes in the System.Net namespace. The main requirement is that the services you want to use should implement either crossdomain.xml (which is the Flash policy file) or clientaccesspolicy.xml (which is the Silverlight one). If the service you want to use does not implement one of these then you can't use Silverlight to access it. However such restrictions are not present when using WebClient on the server, so you can easily create a bridge service that your Silverlight client can use....
This error had me baffled today, and I could find little reference to it from Google or Live Search. It was the result of creating a simple WCF Service with two methods as follows and then trying to add a reference to it from Silverlight 2: [ServiceContract]
public interface IWcfService
{
[OperationContract]
string HelloWorld(string name);
[OperationContract]
List<Person> GetPeople();
}
public class WcfService : IWcfService
{
public string HelloWorld(string name)
{
return "Hello World " + name;
}
...
Todd helpfully re-published the Windows Mobile Silverlight roadmap recently. It does not make exciting reading. In amongst news of Impressive Google Android Apps, (and here) a T-Mobile Android phone this year (from HTC) and endless twitter about iPhone and 3G, the road map is hardly going to light any fires. Here's my take on the Windows Mobile roadmap in general, followed by my hope of a glimmer of light for all us WM developers and users... Windows Mobile 6.1 was just released - really nothing to write home about - threaded SMS is nice but there is not much...
I have noticed that more and more places in the UK are getting the 3D treatment in Virtual Earth, but there doesn't seem to be a list of all of them (at least I couldn't find one). The UK models do not yet support the recent enhancements that some of the US cities have (such as Denver or Las Vegas) where vegetation is modelled as well as the buildings, but I expect that it is just a matter of time.
So anyway I have created a collection of places in the UK where I have spotted 3D models - bear in...
I have a ListBox in a Silverlight 2.0 app that is bound to some data coming from a WCF service that is returned from Linq to Sql. The service is simplicity itself: public List<CourseSection> GetCourseSections()
{
CoursesDataContext db = new CoursesDataContext();
return db.CourseSections.ToList();
}
Note: you have to mark your DataContext Serialization Mode as Unidirectional for the above to work (as shown)
I added a Service Reference to this from Silverlight and bound the data to a ListBox:
private void Button_Click(object sender, RoutedEventArgs e)
{
CoursesService.CourseServiceClient client = new CourseBuilder.CoursesService.CourseServiceClient();
client.GetCourseSectionsCompleted += ...
Silverlight 2.0 might be all the fashion but 1.0 is released and out there, so there is value in using it purely for the wider reach and acceptance of users who are happier to install the released plugin.
So here is a easy little app you can write your self to give you an image rotator with click through and whatever logic you want for the weighting of the images.
It fits together as follows:
A Silverlight Xaml page with some JavaScript to control it
An Asp.Net web page with the Script manager from the...
If you are getting into LINQ - then this free, copy and run app, is a great way to play with it.
It's a companion to C# 3.0 in a Nutshell but it is valuable without the book, and comes with 200 samples!
Recommended!
Cheers
Ian
Technorati Tags: Linq,LinqPad,C#,Nutshell
Technorati Tags: silverlight,silverlight 2.0
Silverlight has great full-screen support, and it is a simple matter to switch to full screen by setting the IsFullScreen property of the content object as follows. Note for security reasons this can only be done in response to user input; note also that this code has changed from version 1.1 alpha
//get the plugin content object
System.Windows.Interop.Content content = Application.Current.Host.Content;
public Page()
{
InitializeComponent();
// wire up key down and full screen changed events
this.KeyDown += new KeyEventHandler(Page_KeyDown);
content.FullScreenChanged += new EventHandler(Content_FullScreenChanged);
}
void Page_KeyDown(object...