SIL.FieldWorks.XWorks.FwXWindow.ResyncRootboxStyles C# (CSharp) Method

ResyncRootboxStyles() private method

Get all the rootboxes we know about and reinitialize their stylesheets.
private ResyncRootboxStyles ( ) : void
return void
		private void ResyncRootboxStyles()
		{
			FwStyleSheet fssPrev = null;	// this is used to minimize reloads via Init().
			foreach (IVwRootBox rootb in FindAllRootBoxes(this))
			{
				FwStyleSheet fss = rootb.Stylesheet as FwStyleSheet;
				if (fss != null && fss.Cache != null)
				{
					Debug.Assert(fss.Cache == Cache);
					if (fss != fssPrev)
					{
						Debug.Assert(fss.RootObjectHvo != 0);
						fss.Init(Cache, fss.RootObjectHvo, fss.StyleListTag);
					}
					rootb.OnStylesheetChange();
					fssPrev = fss;
				}
			}
		}
FwXWindow