1

Can anyone point me in the direction of some potted WPF controls for interacting with SharePoint fields? Ideally, they should have comparable functionality to the HTML fields defined in the SharePoint XML namespace used in SharePoint designer. An ideal scenario would be to include similar syntax to the server-side defined HTML elements referencing a field in a list, and let the control decide what sort of data it needs to represent, and whether it needs to be editable or not.

In particular, I need it to support:

  • A people finder field that allows people to be identified from their names, email addresses, or usernames, much like the default HTML form element.
  • A formatted text field that provides basic formatting tools in the ribbon, as well as being able to provide the formatted text back as HTML (because this is how it seems to get stored in SharePoint).
  • Text boxes (single/multiline), combo boxes, and radio buttons (but these are all relatively easy, because they already exist as WPF controls)

In addition, values need to available in a way that allows me to push them back to the server and expect items to update. This is most important for formatted text and user "people" fields, since their displayed value is often quite different from the actual value (e.g. includes indexes to the UID for the user, or includes HTML respectively).

At present, following a lack of responses to a similar question on SharePoint StackExchange, I'm hosting the existing SharePoint forms in a WebBrowser control, which is, fairly obviously a pretty sub-optimal solution (mostly for UX and stability reasons); worst case, I can inject some CSS into the pages being displayed to hide them, but I'd really rather be abel to build something that's relatively robust.

Community
  • 1
  • 1
tobriand
  • 1,095
  • 15
  • 29
  • `build something that's relatively robust` - which means you don't want to use HTML. I'm not aware of such a library, sounds like a nice OSS to work on, though. – Federico Berasategui Mar 27 '15 at 16:01

1 Answers1

0

SharePoint 2010 has provided both the Server Object and Client Object model using which a developer can use a client interface like WinForm or WPF and interact with SharePoint 2010 Web Applications, as well as work with SharePoint Objects. SharePoint 2010 has also provided Web Services and WCF services using which any client UI application can interact with it.

To use client object model, SharePoint 2010 has provided the following assembly references:

Microsoft.SharePoint.Client.dll Microsoft.SharePoint.Client.Runtime.dll

You can find these references from the following path: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI

And for 2013: C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI

Sources: http://www.dotnetcurry.com/showarticle.aspx?ID=761 http://www.dotnetcurry.com/showarticle.aspx?ID=758

This said, have you considered to do this using the content editor web part and JavaScript / jQuery and incorporate the app into the SharePoint stack?

Here is a similar question answered

Hope this helps!

Community
  • 1
  • 1
Bryan
  • 3,271
  • 2
  • 15
  • 30
  • 1
    Unfortunately, there's a difference between an api for interacting with Sharepoint, and a WPF control. I'm aware of the Client Object Model already (I'm using it heavily already), but unless I'm missing something, it doesn't provide e.g. a Xaml People Picker that lets you pass a name for whom there are multiple matches, and help you resolve which name you want. In HTML forms, that kind of thing is automatic. That (and rich text editing that's compatible with online) are mainly what I'm after. – tobriand Apr 19 '15 at 23:42
  • There is not much functionality to extend all the way to that. There are other answers related i.e. https://stackoverflow.com/questions/10658472/datetimepicker-for-wpf-4-0 and http://www.sharepoint-tips.com/2007/10/using-sharepoint-people-picker.html – Bryan May 24 '15 at 17:07