DisplayName is disappeared when Runtime is set - powerpoint

I have a PowerPoint Add-in. There is a manifest file.
It contains a tag
<DisplayName DefaultValue="Office App"/>
The taskpane has a header as expected:
Everything works fine until I add
<Runtimes>
<Runtime resid="Defaults.Url" lifetime="long" />
</Runtimes>
With this tag, my taskpane does not contain the header anymore:
This tag is required, because Enable and Disable Add-in Commands programmatically possible only with shared runtime.
Manifest file checked, it does not contain errors.
Any idea why the label does not appear with shared runtime?

Related

Common JavaScript function for Outlook Add-ins

I have an Outlook Add-ins to automatically insert signature.
With desktop client, manifest.xml refers to only 1 javascript file, so I need to put everything in 1 single file.
However, I want to reuse some of the function it contains in the taskpane, which use another set of Javascript files.
Is there a way to create a common.js file that would be included everywhere?
Thanks
You can create a JS file specifically for automatically inserting the signature, and then include that file in the HTML for the taskpane. Just ensure that this javascript file only contains ES6 code, and mainly API calls that you want to be shared between the signature insertion and the taskpane parts of your add-in. Also, include it in the taskpane HTML file, after the taskpane JS file.
Alternatively, it is OK to have 2 separate files here to avoid accidentally breaking one part of your add-in when you make future updates to it.

Supported Cultures Box not available in manifest

This msdn link says that to add more language to your windows phone app, you need to make changes in the supported culture box in the properties page, but I can't find such box in the properties page as well as manifest page.
I tried searching all the tabs and I have uploaded the screenshots of properties page as well as manifest, but I'm not able to find the required box.
I have developed an application and updated on the store but only English (US) is the supported language and I'm not able to localize the app.
I'm not able to add screenshots as it requires more that 10 reputation.
Adding resource files
You do not specify what languages you support in the project properties any more. You only specify the default language in the app manifest.
You have to manually add one .resw file for each language you support. The files must all be named Resources.resw and must be placed in a sub-folder, named after the language, under a “Strings” folder in your project.
Accessing resources from xaml
You access the resources by setting the x:Uid property of a control to a unique name. Unfortunately the x:Uid property is not recognized by the properties window, neither in VisualStudio nor in Blend, so you must hand code it directly in the xaml file.
Example:
<TextBlock x:Uid="MyTextBlock" /> <Button x:Uid="MyButton" />
<TextBlock x:Uid="MyTextBlock" />
You must then add a resource with the uid-name with dot-notation, that is, after the dot you write the name of the property of the control in which you want the text.
Reference : http://www.jayway.com/2014/04/22/windows-phone-8-1-for-developers-localizing-apps/

How can I add an icon in a SharePoint document library template?

i want to insert a image in a sharepoint document library template.
It should appear when I click Site Settings -> More Options -> in the Library selection.
I tried to manipulate the manifest.xml - File with the ImageUrl-Tag and it didn't help.
Is it possible? I've searched for many days an can't find anything.
THX
You want to add a preview image to a custom SharePoint document library you created, correct?
I'm assuming you have created a list template (specifically a document library template). In the elements.xml of that template you have the Image attribute which represents the preview image.
Here is an example elements.xml for a custom document library:
<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<ListTemplate
Name="MyList"
Type="10012"
BaseType="1"
OnQuickLaunch="TRUE"
SecurityBits="11"
Sequence="110"
DisplayName="My List"
Description=""
Hidden="false"
Image="/_layouts/images/itdl.png"
DocumentTemplate="121"/>
</Elements>
The document library will be shown with the image located at /_layouts/images/itdl.png as its preview image. You said you tried settings the ImageUrl attribute - this doesn't exist for a list template, though it would exist when you were creating a web template (see this SO post).

Developing an OpenSocial Gadget within Visual Studio

We are about to implement a bunch of OpenSocial gadgets. They are not going to be run on Facebook or any other social network but rather on our own internal Apache Shindig server. (We embed these gadgets using iframes in a normal ASP.NET MVC cshtml view)
According to http://docs.opensocial.org/display/OSREF/OpenSocial+Tutorial, the structure of a gadget is like so:
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Hello World!">
<Require feature="opensocial-0.8" />
</ModulePrefs>
<Content type="html">
<![CDATA[
Hello, world!
]]>
</Content>
</Module>
Whereas the HTML, CSS and JS are embedded within the in the tag. If we want to develop a file like this in XML format in Visual Studio, it renders Syntax Highlighting, IntelliSense, IntelliTrace and JavaScript debugging impossible. That's not very comfortable.
Question 1: Do you know of any usable(!) extension for Visual Studio that re-enables all these features for these OpenSocial XML gadgets?
Question 2: Or if not, have any of you ever tried the same and found a good way to work around these hurdles?
Update: We have done a proof-of-concept of using a post build step that takes a plain HTML file, a plain JS file, and an XML skeleton and merges them into a gadget. In debug mode we might conceivably include the plain files directly while in the deployment process we call Shindig with the merged XML file from the post build step:
if (#Html.IsDebugMode())
{
<iframe src="/Gadgets/HelloWorld.html"/>
}
else
{
<iframe src="http://example.org/shindig?url=http://example.org/Gadgets/Merged/HelloWorld.xml"/>
}
This is how the solution works:
Add a Gadgets\HelloWorld.js file
Add a Gadgets\HelloWorld.html file that includes the js file.
Add a Gadgets\HelloWorld.xml file with the gadget XML but with an empty <Content> tag.
Create a CSHTML page with an iframe that includes the plain HTML file in Debug mode but includes the Gadget in Release mode.
Define a Post Build Event that reads the contents of HelloWorld.html and pastes it into the Content tag of the XML. In addition it reads the JS code from the JS file and replaces the script inclusion <script src="HelloWorld.js" /> in the HTML by an inline JavaScript <script>...</script> with the respective code.
Advantages:
Clean separation of logic (JS file), presentation (HTML file) and metadata (XML file).
Complete Visual Studio HTML authoring support when working on the HTML.
Complete Javascript authoring support when working on the JS.
Tools such as JSLint can be used to check the JavaScript style.
Caveats:
In Debug mode, if we call Shindig to render the gadget, we don't have a way to open the JavaScript in Visual Studio and setting a breakpoint. However, if any error occurs in the JS code, Visual Studio will open a view on the JS code and mark the erroneous line. Once that view is open, we can use it for setting break points, too. Live editing is not possible though because the original JS file only gets merged into the XML in the course of the build process.
On the other hand, if we include the plain HTML file as an iframe instead of having Shindig render it, we gain the possibility of live-editing and debugging directly in the respective files. But of course all of the Shindig features are not effective. In particular, all the scripts automatically added by Shindig are missing or have to be included by hand.
Ideally every change in the HTML or JS file while running the application in debug mode would immediately update the merged Gadget XML file, thus allowing life editing even when using Shindig.
A2: You can develop your javascript in a separated js file and just include it in the gadget xml as you would with html file contain a js include. Further more, you can use frames inside your gadget html, but that will may prevent you from using some of the js API available from Shindig.

Silverlight app Image not showing at runtime

In Visual Studio 2010 I have created a new project with the Silverlight Business Application template. I added an Images folder under the Assets folder. The png files in this folder have Build Action set to Resource, and Copy To Output Directory set to Always. In the header section I added an <Image Source="Assets\Images\logo.png" /> element. In design time it displays my image. At runtime it does not.
Any idea as to why my image is missing at runtime?
--Shawn
I had a similar problem with images showing in design-time, but not at runtime. Mine was using a pack URI so I wanted to post that fix as well:
Does not work at runtime, does work at design-time:
<Image Source="TelerikDemo;component/Images/logo.png" />
Works at both design and runtime:
<Image Source="/TelerikDemo;component/Images/logo.png" />
Note the extra '/' before the Pack URI starts.
hmf! Turns out my backslashes needed to be forward slashes!

Resources