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

ListView transparent selection color for Cells

$
0
0

Hey Guys,

How can I disable the selection Color of a ViewCell durable?

I created an own CustomRender for iOS and ViewCell:

public override UITableViewCell GetCell(Cell item, UITableViewCell reusableCell, UITableView tv)
  {
            if (reusableCell == null) return base.GetCell(item, reusableCell, tv);
            reusableCell.BackgroundColor = UIColor.Clear;
            reusableCell.SelectionStyle = UITableViewCellSelectionStyle.None;
            return base.GetCell(item, reusableCell, tv);
  }

But this Solution works only if I refresh my View (Pull to refresh) then the selection has no color. until I change the View and go back to this view.
then i have to refresh again to get this working ...

How can i globally disable a selection style?

Kind regards,

Christian


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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