vs2013 skin Full Transparent treatment • Full transparent skin background

Source: Internet
Author: User

, a single-coding vs will always make people irritable, if you change a background, it would certainly make the program ape better ...

Formally cut into the subject, take vs2013 as an example.

Description: After a series of processing, will produce another vs2013 experimental example, that is, we want to target, the original vs2013 will exist, no change.

Preparation: 1, Visual Studio SDK

2. Visual Studio-Color Theme Editor

(two items can be downloaded in the "Tools---extensions and updates")

3. A picture

Steps

1), after installing the SDK, enter vs. Create a new project, find the "Visual Studio package" in "Other projects types", and in the next dialog box, select "C #" and then basically the next step. Cancel the two checkboxes at the last step, because that's not useful here. Finally, a new VS extension project was created successfully. //For simplicity, the file name is Beijing

2), add at "References"

"PresentationCore"

"PresentationFramework"

"System.Xaml"

"WindowsBase"

"System.ComponentModel.Composition"

"Microsoft.VisualStudio.CoreUtility"

"Microsoft.VisualStudio.Text.UI"

"MICROSOFT.VISUALSTUDIO.TEXT.UI.WPF"

3), open "XXXPackage.cs" (XXX is generally the name of this project) file, the code is as follows:

Using company.beijing;//beijing is the file name 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 = +)] [Guid (G uidlist.guidbeijingpkgstring)]//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 Idebackgroundpackage:package {PROTECTE D override void Initialize () {base.            Initialize ();        Application.Current.MainWindow.Loaded + = mainwindow_loaded;            } void Mainwindow_loaded (object sender, RoutedEventArgs e) {var Rwindow = (Window) sender; var Rimagesource = Bitmapframe.creatE (New Uri (@ "D:\VS2013\1.jpg"/* Picture path */), bitmapcreateoptions.none, bitmapcacheoption.onload);            Rimagesource.freeze (); var Rimagecontrol = new Image () {Source = Rimagesource, Stretch = stretch.unifor Mtofill, HorizontalAlignment = horizontalalignment.center, VerticalAlignment = Verticalalig Nment.            Center,};            Grid.setrowspan (Rimagecontrol, 4);            var Rrootgrid = (Grid) rWindow.Template.FindName ("Rootgrid", Rwindow);        RRootGrid.Children.Insert (0, Rimagecontrol); }    }}

4), compile and run to get another vs2013 experimental example, the lower left corner can be seen



5), then modify the skin transparency in the vs2013 experimental example

Open "Tool---Customize colors", this example is dark-based, create another dark theme, and go to the "Edit theme" color area.

"Environment→environmentbackgroundgradientxxx"

"Environment→mainwindowactivecaption"

"Environment→mainwindowinactivecaption"

"Environment→commandshelfbackgroundgradientxxx"

"Environment→commandshelfhighlightgradientxxx"

"Environment→commandbargradientxxx"

"Environment→commandbartoolbarborder"

Find these and set their transparency to 0, such as environment→environmentbackgroundgradientxxx, which refers to environment →environmentbackgroundgradient all options starting with

(If you feel trouble, can be loaded directly into my theme, dark for background theme, Http://pan.baidu.com/s/1o6JWweY)



6), then you can see the more impressive background. But the background of the editor is still black. 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 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")] [ContentType ("        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_cont Rol.                    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.closed-            = textview_closed;        R_textview.backgroundbrushchanged-= textview_backgroundbrushchanged; }    }}

7), debugging can enter the experiment with VS, into the color table, find "Environment→environmentbackground", set to transparent. Then find "Environment→window" set to Transparent, "treeview→background", transparency set to 0

The target vs2013 background can be obtained by the above steps. (The only regret is that the "error List" cannot be transparent.)

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.

Original or original, if you need to use the skin, you must use the VS2013 experimental instance, can be found on the upper path



vs2013 skin Full Transparent treatment • Full transparent skin background

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.