2

Ladies and gents I've been looking for some time but haven't found any definitive answer. Is it possible to use SharePoint UI (either controls or web parts) in a provider hosted application [MVC 5, s2s Full-trust for example].

Yes, I know, we can use Chrome to give some "SharePointish" look and feel to application but is there any way to use a lot of good UI components available in SharePoint itself? For example I want to show some news from site on app main page (there is a web part for it) or display some list in native SharePoint style. It would be nice to have some way to reuse UI components.

1

No, it isn't possible unfortunately. With a provider hosted application, your app is hosted completely independently from SharePoint and could (more or less) run even if SharePoint did not exist.

If you want to make use of SharePoint components and web parts, you may want to consider refactoring your app. For example, if you want a page with a mix of your custom functionality and some SharePoint web parts, you would bundle your app functionality into a web part or web parts (app parts) instead of app pages. Then you would create a SharePoint page (or pages) which use a combination of your app parts and SharePoint web parts.

  • Steven, I understand that this is the case with two independent systems, even hosted (usually) on different servers. You and bloC, pointed that there is no "clean" way to achive such an embedding. Now I wonder, is it possible to do it in some "alternative" manner? – ProfyTroll Mar 4 '16 at 9:29
  • BTW is it possible in sharepoint hosted apps or only in solutions? – ProfyTroll Mar 4 '16 at 9:30
0

You are right, it's really difficult to get a definitive answer. As far as I know it is not possible in a comfortable way. You can always try to get the data via ClientContext and display the data with some nice css.

Nevertheless there is an official NuGet package called 'Office Web Widgets' (https://msdn.microsoft.com/en-gb/en-en/library/office/dn636913.aspx)

As far as I know these Widgets are still experimental and are only providing a way to display a userpicker and a list.

But maybe it helps you in some way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.