This is a migrated thread and some comments may be shown as answers.

Customizing TKSideDrawerTableViewCell

1 Answer 19 Views
SideDrawer
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Trevor
Top achievements
Rank 1
Trevor asked on 31 Mar 2017, 08:21 PM

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!

1 Answer, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 03 Apr 2017, 08:18 AM
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.
Tags
SideDrawer
Asked by
Trevor
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Share this question
or