示例#1
0
		void HandleLabelClick (object sender, EventArgs e)
		{
			if (sender == ActiveLabel) {
				return;
			}

			HorizontalMenuLabel label = sender as HorizontalMenuLabel;
			if (label != null) {
				ActiveLabel = label;
			}

			if (OnLabelClick != null) {
				OnLabelClick (new object (), null);
			}
		}
示例#2
0
		public HorizontalMenu (Activity activity) : base (activity)
		{
			BackgroundColor = CustomColors.LightColorDim;
			mapLabel = new HorizontalMenuLabel (activity);
			mapLabel.Text = "Map";
			mapLabel.Click += HandleLabelClick;

			myListLabel = new HorizontalMenuLabel (activity);
			myListLabel.Text = "My Places";
			myListLabel.Click += HandleLabelClick;

			AddViews (
				mapLabel,
				myListLabel
			);
			ActiveLabel = mapLabel;
		}
示例#3
0
		public void RestoreInitalState ()
		{
			if (ActiveLabel == mapLabel) {
				return;
			}

			ActiveLabel = mapLabel;
			if (OnLabelClick != null) {
				OnLabelClick (new object (), null);
			}
		}