/// <summary> /// Shows the ContextPopup. The ContextPopup is positioned at the horizontal and the vertical position /// of a specific anchor with offsets. /// </summary> /// <param name="anchor">The view to which the popup should be anchored.</param> /// <param name="xAnchorOffset">The horizontal offset from the anchor.</param> /// <param name="yAnchorOffset">The vertical offset from the anchor.</param> public void Show(XForms.View anchor, int xAnchorOffset, int yAnchorOffset) { var geometry = XFPlatformTizen.Platform.GetRenderer(anchor).NativeView.Geometry; _popup.Move(geometry.X + xAnchorOffset, geometry.Y + yAnchorOffset); _popup.Show(); }
public void Show(View anchor, int xAnchorOffset, int yAnchorOffset) { //Console.WriteLine("Show() anchor:" + anchor + ", xAnchorOffset:"+ xAnchorOffset + ", yAnchorOffset:" + yAnchorOffset); var geometry = XFPlatformTizen.Platform.GetRenderer(anchor).NativeView.Geometry; _popup.Move(geometry.X + xAnchorOffset, geometry.Y + yAnchorOffset); _popup.Show(); if (_items.Count >= 2) { int index = 0; foreach (var item in _items) { var nativeItem = item.Value; if (index % 2 == 0) { nativeItem.Style = "select_mode/top"; } else { nativeItem.Style = "select_mode/bottom"; } index++; } } }