Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with StyledMultilineElement Height When Image Present #207

Open
TonyLugg opened this issue Dec 16, 2013 · 1 comment
Open

Problem with StyledMultilineElement Height When Image Present #207

TonyLugg opened this issue Dec 16, 2013 · 1 comment

Comments

@TonyLugg
Copy link

After I create StyledMultilineElement I am assigning an Image to it like this:

loStyledMultilineElement = new StyledMultilineElement(lcAreas, lcTimes, UITableViewCellStyle.Subtitle);
if (lbIsFavorite)
{
loStyledMultilineElement.Image = UIImage.FromBundle("Images/favorite.png");
}
else
{
loStyledMultilineElement.Image = UIImage.FromBundle("Images/non-favorite.png");
}

In the SytledMultilineElement’s GetHeight method, it is not accounting for the width of the space that is given to the image, i.e. the amount that the text is inset to provide room for the image. Consequently, the height is not being calculated properly when the element has an image assigned.

@migueldeicaza
Copy link
Owner

Thanks for the bug report, I will look into it. Good detective work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants