Customizing TKSideDrawerTableViewCell

Thread is closed for posting
2 posts, 0 answers
  1. Trevor
    Trevor avatar
    18 posts
    Member since:
    Feb 2017

    Posted 31 Mar Link to this post

    Hi,

    I am trying to do something similar as to this post, but in C#, http://www.telerik.com/forums/align-image-in-tksidedraweritem. There is no way to initialize the class with a style when it is defined like:

    01.namespace Mobile.UI.iOS
    02.{
    03.    public partial class SideDrawerCell : TKSideDrawerTableViewCell
    04.    {
    05. 
    06.        public SideDrawerCell()
    07.        {
    08. 
    09.        }
    10. 
    11.        public override void LayoutSubviews()
    12.        {
    13.            base.LayoutSubviews();
    14.        }
    15.    }
    16.}

    This is similar to the definition of the cell in the answer above, but the poster initializes the cell with a style, which I don't know how to do. The ultimate problem I am facing, is that the UIImageView in the TKSideDrawerItem class is not restrictive on size, this makes it very difficult to use retina images, since I want to have an 80px image be shrunk to fit the cell properly. If I set a 40px image, which is the proper size, it is fuzzy, and if I set an 80px image, it is larger then the cell and looks weird. Is there an easy way to fix this? If not, how do I customize a TKSideDrawerTableViewCell in C#? 

     

    Thanks!

  2. Deyan
    Admin
    Deyan avatar
    2147 posts

    Posted 03 Apr Link to this post

    Hi Trevor,

    Thanks for writing and for the provided snippet.

    You can use the layoutSubViews method to access the TKSideDrawerItem and then modify the image expose by it. Is that not helpful?

    Since I might understand your case quite good, any additional details will be very helpful.

    Thanks!

    Regards,
    Deyan
    Telerik by Progress
    Want to build beautiful Android apps as well? Check out UI for Android which enables the same set of scenarios, allowing you to create the same great app experience on both iOS and Android.
Back to Top