iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
My code is working for iOS but not Android.
Could you please add more information regarding the scenario which deals with changing ImageView. It would be much helpful if you could provide with a simple working sample.
Crosslight 2 has a sample named MyInventory_WebAPI. You can find following snippet code in ItemListBindingProvider.cs file.
... ItemBindingDescription itemBinding = new ItemBindingDescription() { DisplayMemberPath = "Name", DetailMemberPath = "Location", ImageMemberPath = "ResolvedThumbnailImage", ImagePlaceholder = "item_placeholder.png" }; ...
By default, ItemList will shows item_placeholder.png" which defined in ImagePlaceHolder. When the image is available, it will replace the item_placeholder.png with the ResolvedThumbnailImage (which defined in ImageMemberPath).
Following snippet code (in Item.cs file) shows how ResolvedThumbnailImage property is defined.
public string ResolvedThumbnailImage { get { if (!string.IsNullOrEmpty(this.Image)) return this.Settings.BaseImageUrl + "thumbs/" + this.Image; return string.Empty; } }
Look forward to hearing back from you.
Oh my code didn't post.
I'd really like to change the background image on the LinearLayout if possible to different images at runtime. This works fine in iOS but not in Android. Can't get the source to change. Let me know if I can change the background of the LinearLayout as well.
using Intersoft.Crosslight; namespace Incroud { public class SimpleBindingProvider : BindingProvider { #region Constructors public SimpleBindingProvider() { this.AddBinding ("LoginButton", BindableProperties.CommandProperty, "LoginCommand"); this.AddBinding ("SignUpButton", BindableProperties.CommandProperty, "SignupCommand"); this.AddBinding ("background", BindableProperties.ImageSourceProperty, "Image"); } #endregion } } public class SimpleViewModel : ViewModelBase { #region Fields private string _image; #endregion #region Properties public string Image { get { return _image; } set { if (_image != value) { _image = value; OnPropertyChanged("Image"); } } } public SimpleViewModel() { this.Image = "fb_button.png"; await TaskEx.Delay (100); this.Image = "anotherImage.png"; }
Please find my sample posted on August 28, 2014 which shows how to load an image from a remote url and locally in Crosslight Images thread.
There are two buttons in the sample. When user press the button, it will change the "image placeholder" in ImageView with other images. The images loaded from a remote url and local.
Please let me know whether the sample helps or not.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname