private void SetupOnHoverImage(QueryTooltipArgs args, IGridWidgetItem photo) { if (photo == null) { return; } if (photo.GetType() == typeof (Photo)) { var previewPhotoTooltip = new PreviewPhotoWidget((Photo) photo); args.Tooltip.Custom = previewPhotoTooltip; } else { var albumName = ((Photoset) photo).HtmlEncodedTitle; var albumNameToolTip = new Label(albumName); albumNameToolTip.UseMarkup = true; args.Tooltip.Custom = albumNameToolTip; } args.RetVal = true; }
private void SetupOnHoverImage(QueryTooltipArgs args, IGridWidgetItem photo) { if (photo == null) { return; } if (photo.GetType() == typeof(Photo)) { var previewPhotoTooltip = new PreviewPhotoWidget((Photo)photo); args.Tooltip.Custom = previewPhotoTooltip; } else { var albumName = ((Photoset)photo).HtmlEncodedTitle; var albumNameToolTip = new Label(albumName); albumNameToolTip.UseMarkup = true; args.Tooltip.Custom = albumNameToolTip; } args.RetVal = true; }
private HBox AddItemToRow(HBox hboxRow, int j, IGridWidgetItem item, string rowId) { this.Log.Debug("AddItemToRow"); Box.BoxChild hboxChild; if (item != null) { var itemWidget = new PhotoWidget(); itemWidget.Name = string.Format("{0}Image{1}", rowId, j); itemWidget.WidgetItem = item; itemWidget.SelectionChanged += OnSelectionChangedInternal; hboxRow.Add(itemWidget); hboxChild = ((Box.BoxChild) (hboxRow[itemWidget])); } else { var dummyImage = new Image(); dummyImage.Name = string.Format("{0}Image{1}", rowId, j); hboxRow.Add(dummyImage); hboxChild = ((Box.BoxChild) (hboxRow[dummyImage])); } hboxRow.Homogeneous = true; hboxChild.Position = j; return hboxRow; }
private HBox AddItemToRow(HBox hboxRow, int j, IGridWidgetItem item, string rowId) { this.Log.Debug("AddItemToRow"); Box.BoxChild hboxChild; if (item != null) { var itemWidget = new PhotoWidget(); itemWidget.Name = string.Format("{0}Image{1}", rowId, j); itemWidget.WidgetItem = item; itemWidget.SelectionChanged += OnSelectionChangedInternal; hboxRow.Add(itemWidget); hboxChild = ((Box.BoxChild)(hboxRow[itemWidget])); } else { var dummyImage = new Image(); dummyImage.Name = string.Format("{0}Image{1}", rowId, j); hboxRow.Add(dummyImage); hboxChild = ((Box.BoxChild)(hboxRow[dummyImage])); } hboxRow.Homogeneous = true; hboxChild.Position = j; return(hboxRow); }