XamarinFormsImageGallery with images from file - image

I'm using this component https://github.com/rasmuschristensen/XamarinFormsImageGallery to take a picture with camera and display it.
I have a problem when I want to show images from file, they don't show. Any suggestions?
Thank you in advance

Ok, I understood the problem. When at the beginning I'm loading in the view model all data and the control can't show anything because it doesn't recognise changes.
Then I bind the view model and then the data.

Related

Counting images hit on AMP pages

Is it possible to count a hit for each image seen by a user (when they scroll the page) on a AMP page just like it's possible to count a hit on a carrousel for each image scrolled for example?
If so could you please let me know how?
Thank you so much for your precious help.
Best
Absolutely you can use amp-analytics and set up a trigger for when an image is visible and use a selector to target the specific image. Please see https://amp.dev/documentation/components/amp-analytics/?referrer=ampproject.org#triggers.
Alternatively, you can use amp-pixel and include that very close to the image. When the amp-pixel is in view, it will fire a request to the endpoint specified on the tag.

Can you include a Jpeg or any image onto an excel form

not sure if this is possible can you add a jpeg or another image to a form created in the vba section in excel? If so would anyone know how to go about doing this...
You are looking for the UserForm object, which has a picture property. There's a bit of info here on how to paste an image in a User Form control which you may find helpful. Best of luck!

replace image using gtk.image.set_from_file

I'm trying to add and if needed by user, change the image from a widget in python.
I'm using Glade with gtk2+, python 2.7.3, and these is what I'm doing
image = gtk.Image()
image.set_from_file("MyImagePath.png")
image.show()
button = App.get_object('buttonExample')
button.add(image)
and this is what I get when try to change the image
GtkWarning: Attempting to add a widget with type GtkImage to a
GtkAspectFrame, but as a GtkBin subclass a GtkAspectFrame can only
contain one widget at a time; it already contains a widget of type
GtkImage
The image is loaded correctly as expected, but if I change the input path for image, I wish I could change the button image, but this is not what I'm getting.
I tried to use gtk.Image.clear(), but it says I cannot use it on a button (maybe im just messing things around)
Is there a good way to load and reload images to a button?
Thx
You either have to remove the old image from the button before adding a new one (the error message is pretty straightforward about this), or you could try changing the current image:
button.get_child().set_from_file("MyImagePath.png")
This was exactly what I needed. I used the clear in the image as you said and also cleaned the button image, as follows:
App.get_object('buttonExample').remove(image)
image.clear()
Thank you very much for you help!

How to display pictures in the project resource?

I have a set of small icons and hope to display them in my application when certain condition occurs, for example on sunny day, I display the sunny icon.
I can add the jpg files in the picture, and they seem to be uploaded to phone when I deploy the app. However, I don't know how to access these jpgs in my program.
Could someone help? Thanks a lot!
Check this post about content and resources: http://www.windowsphonegeek.com/tips/wp7-working-with-images-content-vs-resource-build-action
To summarize: You should mark your images with a Build Action of Content or Resource, preferably Content. Now you can reference the Content from your Xaml or in code.
If the Build Action for your image resources is set to Content, then you just specify the Source property for the Image control to the relative path to your images:
this._image.Source = new BitmapImage(
new Uri("/Images/myImage.jpg", UriKind.Relative"));
You can display pictures using the Image element:
<Image Source="/MyImage.png" Visibility="Visible"/>
If you want to switch images according to conditions then you can create multiple images and change each of their Visibility states - or (more preferable) you can create a single image element and change its Source.
Quite how you do this depends on whether you are using databinding or working directly with the UIElements in code behind.

Axapta: How to load an image from a file on disk into a grid with a Window Control

I have been trying:
to load an image into a window control with a datamethod that loads the file into a bitmap, returning a bitmap. This makes Axapta Crash.
When doing the same but returning an image does not do anything.
using the "active" method on the data source has some success if I set the "imagename" to the filename and the autodecalaration property to "true" on the window component. The Grid does not refresh properly and the pictures dissappear and reappear (while you change rows) for a while until it seems satisfied and then it stays on the screen.
Any help with this will be greatly appreciated.
I found the answer - it would help if the documentation was better.
On the WindowControl: Simply link the datasource to the table containing the field with the string(text) of the full path and filename; and link the datafield to that field. Hey - it works like a charm. I have been trying to return images and bitmaps all the time from a datamethod.

Resources