예제 #1
0
		public ExpanderSection()
		{
			var expandedCheckBox = new CheckBox { Text = "Expanded" };

			var expander = new Expander
			{
				Header = "Test Header",
				Content = new Panel {  Size = new Size(200, 200), BackgroundColor = Colors.Blue }
			};

			expandedCheckBox.CheckedBinding.Bind(expander, e => e.Expanded);

			LogEvents(expander);

			var expander2 = new Expander
			{
				Header = new StackLayout
				{ 
					Orientation = Orientation.Horizontal, 
					Items = { "Test Expanded with custom header", new TextBox() }
				},
				Expanded = true,
				Content = new Panel { Size = new Size(300, 200), BackgroundColor = Colors.Blue }
			};

			LogEvents(expander2);

			Content = new StackLayout
			{
				Padding = new Padding(10),
				Items =
				{
					expandedCheckBox,
					expander,
					expander2
				}
			};
		}
예제 #2
0
		void LogEvents(Expander button)
		{
			button.ExpandedChanged += (sender, e) => Log.Write(button, "ExpandedChanged: {0}", button.Expanded);
		}
예제 #3
0
파일: Expander.cs 프로젝트: yaram/Eto
 /// <summary>
 /// Raises the expanded changed event.
 /// </summary>
 /// <param name="widget">Widget to raise the event.</param>
 /// <param name="e">Event arguments.</param>
 public void OnExpandedChanged(Expander widget, EventArgs e)
 {
     widget.Platform.Invoke(() => widget.OnExpandedChanged(e));
 }
예제 #4
0
 /// <summary>
 /// Raises the expanded changed event.
 /// </summary>
 /// <param name="widget">Widget to raise the event.</param>
 /// <param name="e">Event arguments.</param>
 public void OnExpandedChanged(Expander widget, EventArgs e)
 {
     using (widget.Platform.Context)
         widget.OnExpandedChanged(e);
 }
예제 #5
0
파일: Expander.cs 프로젝트: mhusen/Eto
			/// <summary>
			/// Raises the expanded changed event.
			/// </summary>
			/// <param name="widget">Widget to raise the event.</param>
			/// <param name="e">Event arguments.</param>
			public void OnExpandedChanged(Expander widget, EventArgs e)
			{
				widget.Platform.Invoke(() => widget.OnExpandedChanged(e));
			}