コード例 #1
0
		/// <summary>
		/// Updates the content layout based on the wrappers layout
		/// </summary>
		/// <param name="e"></param>
		protected override void OnLayoutChanged(LayoutChangedEventArgs e)
		{
			base.OnLayoutChanged(e);

			ScriptLayout layout = e.Layout;



			// a change in our layout changes our preferred layout for the Item
			switch (layout)
			{
				case ScriptLayout.None:
				case ScriptLayout.NotAlreadyEstablished:
				case ScriptLayout.Default:
					break;
				case ScriptLayout.Inline:
					ContentLayout = ScriptLayout.Inline;
					break;
				case ScriptLayout.InlineBlock:
					ContentLayout = ScriptLayout.Block;
					break;
				case ScriptLayout.Block:
					ContentLayout = ScriptLayout.Block;
					break;
				default:
					break;
			}
		}
コード例 #2
0
		/// <summary>
		/// Triggered when the items layout is changed
		/// subclasses may alter internal layouts when this is striggered
		/// </summary>
		/// <param name="e">includes the new layout</param>
		protected virtual void OnLayoutChanged(LayoutChangedEventArgs e)
		{
			if (LayoutChanged!=null)
				LayoutChanged(this, e);
		}