Thursday, November 08, 2012

WebpartToolPart category "Appearance" expanded by default - How to revert this ?

I had this problem myself the other day and it seems that all the solutions I found where mostly javascript based. But this is not a good solution in my mind, therefore I did some reflection and came up with this solution, all server side.

public override ToolPart[] GetToolParts()
{

var list = new List<ToolPart>(base.GetToolParts());

foreach (var wptp in list.OfType<WebPartToolPart>())
{
HideExpandIndexes(wptp);
}

return list.ToArray();
}


private void HideExpandIndexes(WebPartToolPart part)
{

var field_helper = part.GetType().GetField("_helper", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy);
var _helper = field_helper.GetValue(part);

var field_expandIndexes = _helper.GetType().BaseType.GetField("_expandIndexes", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy);
var _expandIndexes = field_expandIndexes.GetValue(_helper);

var field_items = _expandIndexes.GetType().GetField("_items", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy);
var _items = (Hashtable)field_items.GetValue(_expandIndexes);

_items.Clear();
}





The code can be improved to a finer detail, but it solves the problem for the moment.

Tuesday, November 06, 2012

SharePoint Manager 2013 (ver: 1.0.12.1106) released

SharePoint Manager 2013 (ver: 1.0.12.1106) is now out of beta and official released for SharePoint 2013 RTM. http://spm.codeplex.com/releases/view/97332

The new version has an expanded view of the SharePoint object model and has been tested on SharePoint 2013 RTM.

As a bonus, the new SharePoint Manager 2013 (ver: 1.0.12.1106) is also available for SharePoint 2010 as a separate download.

Saturday, October 13, 2012

SharePoint Manager 2013 Beta 2

Finally I have been able to release a new version of SPM2013, its has not been easy because of the new node system for the SharePoint object model viewer.

Get it here! SharePoint Manager 2013 beta 2

Previously I was working on SharePoint Manager 2010 v2 Alpha, but it has stopped. The reasons was that first of all it was based on WPF GUI and not WinForms. That should have been cool, but it ended up taking a lot of my time, and not focusing on the application. Further more I did not like the feel of the SPM2010 v2 Alpha, because the PropertyGrid component had to be imbedded into the WPF app as a native winform control and the performance of this is not very good. So all in all I decided to scrap the v2 Alpha version and use some of the code in the SPM2013 beta 2 project, specially the node object model classes.

So what's new in the beta 2?

Splash Screen with validation rules

SplashScreen SPM2013 Preflight check

The splash screen has now been fitted with some validation rules to ensure that you are able to run the application. It should help people telling them that they do not have SharePoint installed or do not have admin rights and so on.

 

Full blown object model

Full blown node model was a legacy from the SharePoint Manager 2010 v2 Alpha project where nearly all SharePoint objects are represented by a new node model. This was however a much large task getting done than first anticipated and took a lot work to get right. To see the full node model in function, select the menu: “View” –> “Object Model” –> “Full”.

ViewFull SPM2013Beta2

The Medium model view is as close to the Beta 1 application as possible.

 

Base on Managed Extensibility Framework (MEF)

The application makes full use of the MEF framework from Microsoft. This will make it very easy for others to extended on the application. The node system fully supports the MEF framework and therefore it will be easy to create separate dll that extends the model without having to recompile the SPM application.

Faster and fewer bugs.

Because of the new node model, some nodes loads faster now and are able to hold correct focus when refreshing the model. The beta 2 will now only open up one site collection in order to save time and memory. Many of the old bugs from beta 1 has now been done in beta 2, some just disappeared because of change of code.

 

Enjoy!

Carsten Keutmann

Thursday, March 01, 2012

Arctic SharePoint Challenge 2012

I’m very happy to announce that I will be a jury member on the Arctic SharePoint Challenge this year. (Spinning of the March 22-24th) I think its going to be a blast and a lot of fun Smiley med √•ben mund

What is the ASPC2012? …

#ASPC​ aims to stimulate collaborative learning, networking and idea generation for participants through hands-on time-limited challenges. We are fiercely competitive, but vastly helpful and extremely sharing (also across teams) realizing that the collective learning is more important than personal gain!

We are working on the optimal formula for 2012, so the rules are still not forged in stone, but expect something similar to last year, only better/more fun/more awesome.

I’ll also be doing some sessions on Advanced SharePoint Caching for developers, SharePoint Patterns and Practices Guidance and MVP pattern for SharePoint Web-parts.

Wednesday, January 25, 2012

Using the MVP pattern for SharePoint Web Parts Presentation

I did a webcast presentation for Adelaide SharePoint User Group this Tuesday. However no recording was made, therefore only the PowerPoint and Demo code is available here: MVPPresentation.zip

MVPDiagram

MVP Pattern rocks for SharePoint!