Esempio n. 1
0
        public static cave.ui.ImageWidget forImage(cave.GuiApplicationContext context, cave.Image image)
        {
            var v = new cave.ui.ImageWidget(context);

            v.setWidgetImage(image);
            return(v);
        }
 private void updateImageWidget()
 {
     if (imageWidget == null)
     {
         return;
     }
     if (widgetImage != null)
     {
         imageWidget.setWidgetImage(widgetImage);
     }
     else
     {
         imageWidget.setWidgetImageResource(widgetImageResource);
     }
 }
        public cave.ui.ImageWidget onStartLoading(bool useOverlay = true)
        {
            removeAllChildren();
            var v = new cave.ui.ImageWidget(context);

            configureImageWidgetProperties(v);
            if (widgetPlaceholderImage != null)
            {
                v.setWidgetImage(widgetPlaceholderImage);
            }
            addWidget((Windows.UI.Xaml.UIElement)v);
            if (useOverlay)
            {
                overlay = (Windows.UI.Xaml.UIElement)cave.ui.CanvasWidget.forColor(context, cave.Color.forRGBA(0, 0, 0, 200));
                addWidget(overlay);
            }
            return(v);
        }