/// <summary>
		/// Handle changes in the size of the underlying view.
		/// </summary>
		protected void OnViewSizeChanged(object sender, FwViewSizeEventArgs e)
		{
			// For now, just handle changes in the height.
			PhoneEnvReferenceLauncher rl = (PhoneEnvReferenceLauncher)this.Control;
			PhoneEnvReferenceView view = (PhoneEnvReferenceView)rl.MainControl;

			if (ContainingDataTree == null)
				return; // called too soon, from initial layout before connected.
			int hMin = ContainingDataTree.GetMinFieldHeight();
			int h1 = view.RootBox.Height;
			Debug.Assert(e.Height == h1);
			int hOld = TreeNode == null ? 0 : TreeNode.Height;
			int hNew = Math.Max(h1, hMin) + 3;
			if (hNew != hOld)
			{
				if (TreeNode != null)
					TreeNode.Height = hNew;
				Height = hNew - 1;
			}
		}
		/// <summary>
		/// Handle changes in the size of the underlying view.
		/// </summary>
		protected void OnViewSizeChanged(object sender, FwViewSizeEventArgs e)
		{
			// For now, just handle changes in the height.
			var vrl = (VectorReferenceLauncher)Control;
			var view = (VectorReferenceView)vrl.MainControl;
			int hMin = ContainingDataTree.GetMinFieldHeight();
			int h1 = view.RootBox.Height;
			Debug.Assert(e.Height == h1);
			int hOld = TreeNode.Height;
			int hNew = Math.Max(h1, hMin) + 3;
			if (hNew != hOld)
			{
				// JohnT: why all these -1's?
				Height = hNew - 1;
				// JohnT: don't know why we need this, vrl is the slice's control and is supposed to
				// be docked to fill the slice. But if we don't do it, there are cases where
				// narrowing the window makes the slice higher but not the embedded control.
				// The tree node is also supposed to be docked, but again, if we don't do this
				// then the tree node doesn't fill the height of the window, and clicks at the
				// bottom of it may not work.
				TreeNode.Height = hNew - 1;
				vrl.Height = hNew - 1;
				// This seems to be really not needed, the view height is docked to the launcher's.
//				view.Height = hNew - 1;
			}
			if (Height != hNew - 1)
			{
				Height = hNew - 1;
			}
		}
		/// <summary>
		/// Handle changes in the size of the underlying view.
		/// </summary>
		protected void OnViewSizeChanged(object sender, FwViewSizeEventArgs e)
		{
			// When height is more than one line (e.g., long definition without gloss),
			// this can get called initially before it has a parent.
			if (ContainingDataTree == null)
				return;
			// For now, just handle changes in the height.
			var arl = (AtomicReferenceLauncher)Control;
			var view = (AtomicReferenceView)arl.MainControl;
			int hMin = ContainingDataTree.GetMinFieldHeight();
			int h1 = view.RootBox.Height;
			Debug.Assert(e.Height == h1);
			int hOld = TreeNode.Height;
			int hNew = Math.Max(h1, hMin) + 3;
			if (hNew > hOld)
			{
				TreeNode.Height = hNew;
				arl.Height = hNew - 1;
				view.Height = hNew - 1;
				Height = hNew;
			}
		}