/// <include file='doc\PropertySheet.uex' path='docs/doc[@for="LanguagePreferences.Apply"]/*' /> public virtual void Apply() { IVsTextManager2 textMgr2 = site.GetService(typeof(SVsTextManager)) as IVsTextManager2; if (textMgr2 != null) { this.prefs.guidLang = langSvc; LANGPREFERENCES2[] langPrefs2 = new LANGPREFERENCES2[1]; langPrefs2[0] = this.prefs; if (!NativeMethods.Succeeded(textMgr2.SetUserPreferences2(null, null, langPrefs2, null))) { Debug.Assert(false, "textMgr2.SetUserPreferences2"); } } }