vs2013 or 2015 interface personalization (change background, theme)

Source: Internet
Author: User
Tags custom name

This is the first time to write about software configuration blog, or tutorial bar, so write as much as possible in detail.

In order to change the background of the vs2013, on-line search information, and then try to get it, toss a long time to fix, in order to let everyone less detours, less cost a few hours, so I write a blog, to help the small partners really need. A period of time has just been configured vs2013 theme background, sent to let everyone see the first (background image can be changed by themselves OH)



This blog mainly solves the problem of installing visual Studio Color Theme Editor on win10 users.

Nonsense not much to say, down into the subject:

1. Install the required plugins

1> Visual Studio SDK (available in vs2013---> Tools----> Extensions and extensions-Online search download)

Download Address: http://www.microsoft.com/en-au/download/details.aspx?id=40758



2> Visual Studio 2013Color Theme Editor (Win7 users can search for downloads in vs2013---> Tools----> Extensions and extensions-online ...

If you do not have or do not bother to search, blog behind a more detailed tutorial, look down Oh. )

Download Address: Https://visualstudiogallery.msdn.microsoft.com/9e08e5d3-6eb4-4e73-a045-6ea2a5cbdabe (can search the name on the Internet, download a OK)



Win10 system seems to be able to download and install the first plug-in, the second plug-in installation will be error, or two installation errors (Win7 can be directly according to the above method to try, read the newspaper without error)

If the error, do not download the installation in the vs2013, directly on the Internet search and download and install

About Win10, the "tools--Extensions and Updates" installation will prompt net.xxx for errors or warnings (the version is not expected to match)

Solution:

Open extensions and updates under Tools Select the upper-right corner of "online" search "Visual Studio Theme Editor" (Note the space, no space seems to be found)

"Details" on the right side of "Visual Studio Theme Editor", we download this extension package separately from the website


After downloading, open with the compression tool, and then modify the file name "extension." Vsixmanifest "file, right-edit him (with Notepad edit oh) <dependency id=" Microsoft.Framework.NDP "Displayname=" Microsoft. NET The Framework "version=" 4.5 "/> This passage removed.


Re-put the modified file back in the "Colorthemeeditor" file. Turn off the compression tool and click Install.

After the installation is successful, open the C:\Users\13081\AppData\Local\Microsoft\VisualStudio directory (the red font is the Host account name, you are certainly not the same as me, so you modify it yourself), you can see this directory has two folders, As shown in figure


One has exp suffix, one does not. This is the successful installation of "Visual Studio Color Theme Editor", and exp (that is, we changed the background of VS) is not installed, then we will not have the suffix folder within the "Extensions "Copy the file to the Exp suffix folder and start the VS2013 personalized version again.

Open "Tools" → "Extensions and updates" found in the installed "Visual Studio Color Theme Editor" Start it → restart VS2013 personalized version. You can see that the "Tools" bar option is much lower after rebooting.

"Change color Theme" and "Customize Colors"

"Change color Theme" with more themes to choose from.

Open "Customize Colors"

At this point, the Visual Studio Color Theme Editor is installed successfully and will be used later in your tool.


2. After installing two plug-ins according to the above method, open vs2013

A, click on "File--new--" in "Installed" select "C #" Inside the "extensibility" select "Visual Studio package" → "OK" to establish a VSPackage (custom name, If there is a problem in the next operation, try to try the pure letter name. Oh, yes, "extensibility" in "Other project types" can also find "Visual Studio package" (which is sure to be found if installed correctly)





B. After the project is established, open the Solution Explorer and right-click on "Reference" and "Add Reference" to add the following reference (one add)

"PresentationCore"

"PresentationFramework"

"System.Xaml"

"WindowsBase"

"System.ComponentModel.Composition"

"Microsoft.VisualStudio.CoreUtility"

"Microsoft.VisualStudio.Text.UI"

"MICROSOFT.VISUALSTUDIO.TEXT.UI.WPF"


You can search for the name you want to add in the search assembly above (upper-right arrow)

C, add the completion, open "XxxPackage.cs" (XXX is the name of the project you just built, I here is VSPackagePackage.cs), delete your original code, paste the following code into your file inside

<pre name= "code" class= "CSharp" >using Microsoft.visualstudio;
Using company.vspackage;////pay attention to change the VSPackage in this sentence, changed to your project name, if not found using Microsoft.VisualStudio.Shell;
Using Microsoft.VisualStudio.Shell.Interop;
Using System;
Using System.Runtime.InteropServices;
Using System.Windows;
Using System.Windows.Controls;
Using System.Windows.Media;

Using System.Windows.Media.Imaging; namespace Moen.idebackground {[PackageRegistration (usemanagedresourcesonly = True)] [installedproductregistration
    ("#110", "#112", "1.0", IconResourceId = 400)] [Guid (guidlist.guidvspackagepkgstring)]//Notice to change the vspackage in this sentence, change to your project name, if not found, you can find the variable name in Guids.cs, the header file also needs to be changed [ Provideautoload (uicontextguids.nosolution)] [Provideautoload (uicontextguids.solutionexists)] public sealed class I debackgroundpackage:package {protected override void Initialize () {base.

            Initialize ();
        Application.Current.MainWindow.Loaded + = mainwindow_loaded; } voidMainwindow_loaded (object sender, RoutedEventArgs e) {var Rwindow = (Window) sender; var rimagesource = bitmapframe.create (new Uri (@ "C:\vs background \11.jpg"/* Picture path */), Bitmapcreateoptions.none,
            Bitmapcacheoption.onload);

            Rimagesource.freeze (); var Rimagecontrol = new Image () {Source = Rimagesource, Stretch = Stretch.uni Formtofill, HorizontalAlignment = horizontalalignment.center, VerticalAlignment = Vertical

            Alignment.center,};
            Grid.setrowspan (Rimagecontrol, 4);
            var Rrootgrid = (Grid) rWindow.Template.FindName ("Rootgrid", Rwindow);
        RRootGrid.Children.Insert (0, Rimagecontrol);
 }
    }
}

Note that the comment above will be changed to the name of the project when you create it. The path to your own picture in the back of the picture above

A new vs2013 experimental instance can be obtained by compiling and running.


Now, you may not see anything, or you can only see some frames have pictures, do not worry, you can see immediately.

Down, we import a transparent theme, this transparent theme, I will upload a file behind the blog, you can download it directly, and then import into your vs inside, is to use the above visual Studio Color Theme editor imported. Import Theme Button Imports (image below)

Of course, if you have trouble, I will upload a theme of my own, which is the background you see above.


After the import, the following will appear the theme you imported, click on the "Edit" button on the top of the topic, go to this page (below)



The following options are found on this page and set to 0,

"Environment→environmentbackgroundgradientxxx"

"Environment→mainwindowactivecaption"

"Environment→mainwindowinactivecaption"

"Environment→commandshelfbackgroundgradientxxx"

"Environment→commandshelfhighlightgradientxxx"

"Environment→commandbargradientxxx"

"Environment→commandbartoolbarborder", such as environment→environmentbackgroundgradientxxx, refers to Environment →environmentbackgroundgradient all options starting with

Next, you can see that in addition to the editor, images from other places can be displayed.

Close the vs2013 Experimental instance, open the original vs2013 and find "source.extension.vsixmanifest" in the document just now.

Go to the "Assets" tab and click the "New" button. In the popup dialog box, "Type" is selected "Microsoft.VisualStudio.MefComponent", "Source" is selected "Aproject in current Solution", "Project" To select the current project, you should now have one option. Last OK


Next, create a new file in the project called "EditorBackground.cs", the code is as follows

Using Microsoft.VisualStudio.Text.Classification;
Using Microsoft.VisualStudio.Text.Editor;
Using Microsoft.VisualStudio.Utilities;
Using System;
Using System.ComponentModel.Composition;
Using System.Windows;
Using System.Windows.Controls;
Using System.Windows.Media;

Using System.Windows.Threading; namespace Moen.idebackground {[Export (typeof (Iwpftextviewcreationlistener))] [ContentType ("Text")] [Contentty
    PE ("Buildoutput")] [Textviewrole (predefinedtextviewroles.document)] class Listener:iwpftextviewcreationlistener

        {[Import] ieditorformatmapservice editorformatmapservice = null;

            public void textviewcreated (Iwpftextview rptextview) {new Editorbackground (Rptextview); Remove the breakpoint sidebar background var rproperties = Editorformatmapservice.geteditorformatmap (Rptextview).
            GetProperties ("Indicator Margin");
            rproperties["backgroundcolor"] = colors.transparent; rproperties["Background"] = BrUshes.
        Transparent;
        }} class Editorbackground {Iwpftextview r_textview;
        ContentControl R_control;
        Grid R_parentgrid;

        Canvas R_viewstack;
            Public Editorbackground (Iwpftextview rptextview) {r_textview = Rptextview;
            R_control = (ContentControl) R_textview;
            R_textview.background = brushes.transparent;
            R_textview.backgroundbrushchanged + = textview_backgroundbrushchanged;
            r_textview.closed + = textview_closed;
        r_control.loaded + = textview_loaded;
            } void Makebackgroundtransparent () {r_textview.background = brushes.transparent;
            R_viewstack.background = brushes.transparent;
        R_parentgrid.clearvalue (Grid.backgroundproperty);
                } void Textview_loaded (object sender, RoutedEventArgs e) {if (R_parentgrid = = null)
R_parentgrid = (Grid) r_control.parent;            if (R_viewstack = = null) R_viewstack = (Canvas) r_control.content;
        Makebackgroundtransparent (); } void Textview_backgroundbrushchanged (object sender, Backgroundbrushchangedeventargs e) {r_c Ontrol.
                    Dispatcher.begininvoke (new Action () = {while (R_parentgrid.background! = null)
            Makebackgroundtransparent ();
        }), Dispatcherpriority.render); } void Textview_closed (object sender, EventArgs e) {//Clears the delegate to prevent memory leaks R_textview.clos
            ed-= textview_closed;
        R_textview.backgroundbrushchanged-= textview_backgroundbrushchanged;
 }
    }
}

debugging, enter the test case VS, enter the color table, find "Environment→environmentbackground", set to transparent. Then find "Environment→window" set to Transparent, "treeview→background", transparency set to 0.


At this point, the merit is Gaocheng ...

Next time directly in the Start menu->microsoft Visual Studio 2013->microsoft Visual Studio Sdk->tools->start experimental Instance of Visual Studio2013 "to open the compiler. Alternatively, you can lock an open experiment instance to the side sidebar of your computer

vs2013 original or original, if you need to use the skin, you must use the VS2013 experimental instance, can be found on the upper path. Other versions of VS should be able to change themes or backgrounds in this way.

Theme Links: Http://pan.baidu.com/s/1mhC9SWK Beauty background Map theme

HTTP://PAN.BAIDU.COM/S/1PLEOFMR Full Transparency Theme





Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.