Strange behavior with Silverlight when showing modal dialogs in SharePoint

Recently I have been working seriously on integrating Silverlight applications in SharePoint. I already have some experience with SharePoint but with my everyday work I discover more and more “features” of that system.

The Scenario

Everything started with a scenario I had to implement within SharePoint and ended up to be related just to Silverlight. So, my scenario involves creating a small Silverlight application, which is displayed within a web part. This application requires showing a modal dialog, which hosts another application. As my web part may be placed in small space, I preferred to use SharePoint’s dialog feature instead of using ChildWindow. Those two Silverlight applications (the one in the web part and the one in the dialog) communicate via local message infrastructure, which Silverlight provides. (more…)

Filled under SharePoint, Silverlight, Uncategorized. 2 Comments.

Custom BDC Connector for SharePoint 2010 – Part 2

In my previous post I started a simple tutorial of how to create your own custom connector for Business Data Connectivity Services for SharePoint 2010. I created my own project in CodePlex where to store the code of these posts. So in this article I will show you the basics of creating your own connector.

Custom connectors are the ultimate abstraction in BDC services. Basically you have the model definition as .NET objects and you can manipulate it as you wish. Internally you can call services, read files, access databases, etc. As a result you need to provide an object which conforms to method’s return type description in the model definition.

Here are the steps when creating a custom connector:

  1. Create your model definition
  2. Write code-behind
  3. Deploy the solution

Note, that the first two steps can be interchanged. Some people prefer to start by writing the code-behind, deploy it and then start wirting their models. However I think it’s a better approach if you start with the model. Having it done in advance you can concentrate on its interpretation. So in this post I will exaplain how to create your model definition. (more…)

Filled under SharePoint. 1 Comment.

Custom BDC Connector for SharePoint 2010 – Part 1

One of the extension points of SharePoint 2010 is through Business Connectivity Services (BCS). Based on these services you can integrate external data sources into SharePoint lists. What’s more, you can work with these lists like normal, without taking care how the data is pulled out.

(more…)

Filled under SharePoint. 1 Comment.

Custom .NET Assembly Connector for SharePoint 2010

One of the great features of SharePoint 2010 is its Business Connectivity Services support. You have an abstraction (really big one) over external data sources like WCF, SQL server and custom .NET types. Basically, you can create lists populated by external data. This is really powerful when it comes to importing results from multiple sytems into SharePoint. I will demonstrate how you can create a custom .NET type which can be used as a data source.

First, start Visual Studio 2010 and create a new SharePoint 2010 Business Data Connectivity Model project .

(more…)

Filled under SharePoint. 1 Comment.

Extending MEF

In the last days of 2010 Mark Seemann announced a Christmas challenge concerning MEF. MEF uses attributes to export objects and inject them later where needed. The challenge was to find a way how to export objects and inject them in constructors without using attributes. Personally I don’t have much experience with MEF because I have mostly worked with other DI containers like autofac and Ninject. I like puzzles like this so I started experimenting. The first thought I had when I saw the chanllenge was about fluent MEF. I knew there was already such a project but I didn’t know its progress. So I started investigating MEF’s extensibility points.

MEF offers a few ways for extensibility. Each of them has its pros and cons so you have to decide which one fits best in your solution. (more…)

Filled under .NET. No Comments.