How to change caption on tab for a custom editor in VS Shell - vsx

I've implemented a custom editor in VS Shell (using an integration package). By default the tab at the top of the editor displays the file name that the editor has currently open.
I'm talking about the text the red arrow is pointing at in the image:
alt text http://img34.imageshack.us/img34/8559/tabtextsample.png
How do I change this to content I supply?

I believe that you would have to be the implementer of the project system. Essentially what happens is that the environment calls CreateEditorInstance on your IVsEditorFactory implementation. Then, the project system calls CreateDocumentWindow to actually open the document. The two parameters of CreateDocumentWindow that control the caption are pszOwnerCaption and pszEditorCaption. The latter is whatever you returned as the caption from CreateEditorInstance. The former is supplied by the project system. These two values are concatenated to form the final caption that is displayed to the user.

Related

Unable to add an image in the storyboard editor in Visual Studio to create a splash screen for Xamarin.iOS

I'm trying to add a splash screen to an iOS app built using Xamarin.Forms. I'm able to get the splash screen itself to display, but I'm unable to add an image to an ImageView in the storyboard editor.
I can replicate this behavior in a brand-new "Cross Platform" solution, and I'm following the instructions here. Specifically, at step 10 in the instructions, you're supposed to be able to select the image from a dropdown.
If you actually click on the arrow of what only appears to be a dropdown, however, nothing actually "drops down"; instead VS opens an OpenFileDialog entitled "Add Existing Item".
No matter what file I choose, VS only adds it to the project's Resource folder (as a BundleResource), but doesn't change the image in the storyboard at all.
I've tried adding the images to the Asset Catalog as both a Launch Image and a regular Image Set. I've tried typing either a filename or an asset set name into the editable part of the "dropdown"; no luck. I've also tried editing the storyboard XML to add an image= attribute (to the ImageView tag), again using either a filename or an asset set name, but it doesn't work, and subsequent saves from the storyboard editor actually remove the attribute. I also tried explicitly adding the entire "Assets.xcassets" folder to the project, as suggested by one of the answers here.
FWIW, the property labeled "Highlighted", directly under "Image", also has the same behavior. I'm assuming this is a VS bug of some sort; the behavior of the property is different not only from what's described in the docs, but conflicts with the appearance of the control.
Has anyone come across a workaround?
Windows 10 Pro
VS 2017 15.8.3
Xamarin 4.11.0.756
Xamarin Designer 4.14.221
Xamarin.iOS and Xamarin.Mac SDK 11.14.0.13
It is bug, you can voite to this problem https://developercommunity.visualstudio.com/content/problem/319294/xamarinios-cant-select-image-asset-for-image-view.html

Keep Drupal content HTML in a uglified state

When I am adjusting content, I click on the source I want the html to be in an uglified state, so it is easier to naivagte, without having to copy and paste the html into HTMLLint, then into Sublime Text (at least once for editing, but definitely in ST2 if I plan on doing several iterations of edits), and then back into the RTF body area.
How do you get it to show the source in an indented view like this:
Maybe also how do you just edit the content in HTML format only? Any Module?
How do you get it to show the source in an indented view
Well, you can't unless it is built into the Rich Text Editor module that you have installed. CK Editor, for example, does indent the HTML nicely.
how do you just edit the content in HTML format only? Any Module?
If you want to edit the content without the Rich Text Editor, you may
disable that particular module admin/config/modules
or make plain text your default by going to admin/config/content/formats and dragging 'Plain Text' to the top of the list.

XPM / UI : Creating new pages based on Page Type with copied components

I relatively simple question regarding XPM this time. It's about creating Page Type which editors could use to base their new website page on. When defining a Page Type, you can use an exisiting page to enable this as an example page, including its components. You can copy these components to enable editors to edit these freely without tampering with existing pages using these components as well.
On the SDL Live content docs they explain the following:
Change the setting from Include this Component Presentation to
Include a Component Presentation that contains a copy of this
Component. If you use this Component in multiple Component
Presentations on this Page, then saving the Page causes all of those
Component Presentations to have the setting you configured last for
any of those Component Presentations. A number of new controls appear.
This means that whenever an editor clicks 'new page' within XPM, this page type is available and the components that are defined inside it are copied with user-specific prefixes. You can define this inside the page defined as a Page Type itself, by clicking on the component presentations tab, then clicking on a component and selecting Page Type settings. note the following:
As you can see, the copy of the content is being created in 050 - Web - Global, which is, in our blueprint, the wrong publication. However, in the popup you cannot select the correct content location, only the one where the page type is residing.
I've tested this, also with the UI -specific blueprint context settings, where you should define where content and pages are created. However, when creating a new page, the components are copied inside 050 - web - global; the wrong publication. As we're moving to a training, I'd imagine that dynamically created components like this might clog the CMS with content in the wrong location, making it unusable for other publications. Is there a reason for this behaviour, and if so, a way to make this work properly?
If you set the BluePrint Context for Components to the Publication where you want them to be created, it should work as you expect.

Browse for Project Folders in Build Template TFS 2010

I'm adding a new argument to my custom Build template. The argument is almost identical to the default Projects to Build argument under Required -> Items to Build. It simply shows a dialog window with a list of folders under current TFS Project. I can't figure out what the type of control is. I tried FolderBrowserDialog but it browses the computer rather than the TFS project itself. Any help would be appreciated.
You can set the Editor for this argument to:
Microsoft.TeamFoundation.Build.Controls.ServerFileBrowserEditor, Microsoft.TeamFoundation.Build.Controls
Or
Microsoft.TeamFoundation.Build.Controls.ServerFolderBrowserEditor, Microsoft.TeamFoundation.Build.Controls
See my blog for a detailed set of steps.
All of these types are Internal, so you can't reference them from your own code or see them easily. What you can do, is set them as Editor for a parameter you created in the Build Workflow. You need to specify Typename, Assemblyname. You can find these items in the MetaData section of your Build Template.
Add your argument to the workflow:
Open the Metadata property:
Set the editor for your property:
A multi-folder select dialog is not part of the Default UI Editors. You'd have to roll your own. Either use Reflector to see how the existing ones work, or use Reflection to invoke th existing editors as part of your new editor.
It's not going to be pretty code either way, but it would work.

WindowIcon not showing up despite being valid in resource (and used elsewhere)

In my last question (Qt/C++: Icons not showing up when program is run) I asked how to get an icon to show up on a toolbar and was told I needed a Qt Resource, which I added and that fixed my problem, the icon did show up on the toolbar.
Now I'm trying to set the title icon of a window, using the same resource file, and it shows up fine in the Qt preview viewer but blank in the actual program. I am using a MainWindow which has an MDIArea and the children are MainWindows as well; neither the parent MDI nor child MDI windows icons will show properly. On the parent, I see the regular "Windows Application icon" and on the child, the icon is completely blank.
How can I solve this?
You will have to go through a standard resource file for windows. (That is, a .rc)
The process (as described in the documentation) is:
Store the ICO file in your application's source code directory, for
example, with the name myappico.ico. Then, create a text file called,
say, myapp.rc in which you put a single line of text:
IDI_ICON1 ICON DISCARDABLE "myappico.ico"
Finally, assuming you are using qmake to generate your makefiles, add this line to your myapp.pro
file: RC_FILE = myapp.rc
Regenerate your makefile and your application. The .exe file will now be represented with your icon in Explorer.
In the Visual Studio case you're simply able to add a resource to your project.

Resources