ObjectDisposedException: Cannot access a disposed object. Object name: 'ContextMenu.Droid.ContextMenuViewRenderer'.
nielscup opened this issue · 3 comments
nielscup commented
I get the above error when navigating to the page containing the contextmenu items the second time. I am using COntextViewCell 2.0.0. Any ideas?
nielscup commented
Fix ContextMenuViewRenderer:
bool isDisposed;
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
isDisposed |= disposing;
}
protected void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (!isDisposed && ChildCount > 0)
{
var bar = GetChildAt(0);
bar.HorizontalScrollBarEnabled = false;
bar.VerticalScrollBarEnabled = false;
bar.OverScrollMode = OverScrollMode.Never;
}
}
AndreiMisiukevich commented
Hey) how about pull request ?)
nielscup commented
Yeah sorry, I don't have a lot of time on my hands, this was a bit quicker for me.