Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

SetBinding Image.IsVisibleProperty isnot working Need help here

$
0
0

Here's my viewcell class
` class InnerHeaderView : ViewCell
{
Label lblSKU;
Label lblProductDate;
Label lblWaveQty;
Label lblUOM;
Label lblCount;
Label lblReason;
Image imgCheck;

    public InnerHeaderView()
    {
        try
        {



            lblSKU = new GridLabel();
            lblSKU.WidthRequest = 200;
            lblSKU.SetBinding(GridLabel.TextProperty, "PRODUCT_CODE");

            lblProductDate = new GridLabel();
            lblProductDate.WidthRequest = 70;
            lblProductDate.SetBinding(GridLabel.TextProperty, new Binding("PRODUCTION_DATE", BindingMode.OneWay,
                                      null, null, " {0:dd/MM/yyyy}"));

            lblWaveQty = new GridLabel();
            lblWaveQty.WidthRequest = 70;
            lblWaveQty.SetBinding(GridLabel.TextProperty, new Binding("ALLOCATED_QTY", BindingMode.OneWay, null, null, "{0:0}"));

            lblUOM = new GridLabel();
            lblUOM.WidthRequest = 70;
            lblUOM.SetBinding(GridLabel.TextProperty, new Binding("UOM", BindingMode.OneWay, null, null, "{0:0}"));


            lblCount = new GridLabel();
            lblCount.WidthRequest = 70;
            lblCount.SetBinding(GridLabel.TextProperty, new Binding("COUNT_QTY", BindingMode.OneWay, null, null, "{0:0}"));


            lblReason = new GridLabel();
            lblReason.WidthRequest = 60;
            lblReason.SetBinding(GridLabel.TextProperty, new Binding("REASON_CHECK", BindingMode.OneWay, null, null, "{0:0}"));


            imgCheck = new Image();
            imgCheck.WidthRequest = 50;
            imgCheck.HorizontalOptions = LayoutOptions.EndAndExpand;
            imgCheck.Source = ImageSource.FromFile("Check.png");
            imgCheck.SetBinding(Image.IsVisibleProperty, new Binding("ISCOUNTED", BindingMode.OneWay, null, null,null));



            View = new StackLayout

            {

                Orientation = StackOrientation.Horizontal,
                Spacing = 5,
                Padding = new Thickness(5),

                Children = { lblSKU, lblProductDate, lblWaveQty, lblUOM, lblCount, lblReason, imgCheck }

            }; 
        }
        catch (Exception)
        {

            throw;
        }

    }

}`

And this is my ItemTap event

` CurrentItem = (BreakCaseCount)e.Item;

                CurrentItem.COUNT_QTY = result;
                CurrentItem.ISCOUNTED = true;`

both are use with INotifyPropertyChanged
COUNT_QTY is updated just fine but for image it doesn't show up somehow
Am i missing something?


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>