Ok, I figured it out... It was my fault. It was working but I only proofed it
with the caption, I thought that the element draw caption after getCell
method, but it rendered before.


Thank you!

PS Miljenko: I'll give you feedback for your MonoMobile framework.


Juan M Gómez
@_jmgomez_
Software Engineer



2012/12/9 Juan Manuel Gómez Álvarez <[email protected]>

> Sure!
>
>
> My custom Element:
>
> public override UITableViewCell GetCell (UITableView tv)
>
>  {
>
>    var cell =  base.GetCell (tv);
>
>  this.Caption+=IndexPath.Row;
>
>  return cell;
>
>  }
>
> Add the Element to one Section
>
>
> Section createCredits()
>
>  {
>
>  var section = new Section("Foo");
>
>  var element = new StyledStringElementId("Foo");
>
>  section.Add(element);
>
>  return section;
>
>  }
>
>
> I create the Root
>
> RootElement createRoot ()
>
>  {
>
>  var root = new RootElement("Foo");
>
>  root.Add(createCredits());
>
>  return root;
>
>  }
>
>
> Finally, I call:
>
> Root = createRoot();
>
> ReloadData(); //Force it
>
>
>
>
> Juan M Gómez
> @_jmgomez_
> Software Engineer
>
>
>
> 2012/12/9 Miljenko Cvjetko <[email protected]>
>
>>  Hi
>>
>>
>> On 2012.12.09 23:07, Juan Manuel Gómez Álvarez wrote:
>>
>> Hello Miljenko,
>>
>> First of all, thank you for the reply.
>>
>> No problems at all.
>>
>>  I was using GetCell() (Element), but the problem occurs when GetCell is
>> called for the first time, because the screen only renders it the second
>> time it is called. I tried to force it with ReloadData, but it doesn't work.
>>
>> Do You have isolated sample?
>> I'll get You in touch with Iki (our iOS guru) I'm more
>> x-platform/business logic oriented.
>> He'll get in touch in few minutes or tomorrow morining CET. OK?
>>
>>
>>
>>  Your MonoMobile.Dialog library looks amazing! I want to try it.
>>
>> It is far from amazing, but we are making small steps, especially since
>> my XAML buddy decided to join us last week.
>> Library is still far from stable, we are using it for our internal PoC
>> projects.
>>
>> mel
>>
>>
>>
>>
>>
>>  Juan M Gómez
>> @_jmgomez_
>> Software Engineer
>>
>>
>>
>> 2012/12/9 Miljenko Cvjetko <[email protected]>
>>
>>>  Hi
>>>
>>>
>>> On 2012.12.09 20:24, Juan Manuel Gómez Álvarez wrote:
>>>
>>> Hello,
>>>
>>>
>>>
>>>
>>>  I want to customize the look of the Sections in MonoTouch.Dialog. I
>>> follow Nic´s approach (link below, thanks Nic), just a little different, I
>>> control the cell´s position from
>>>  the element instead of the section. However, he mentions that he
>>> extends from DialogViewController and overrides the method GetCell as
>>> following:
>>> public override UITableViewCell GetCell (UITableView tableView,
>>> MonoTouch.Foundation.NSIndexPath indexPath)
>>>
>>>  maybe:
>>>
>>>             public override UITableViewCell GetCell (UITableView tv)
>>>             {
>>>             }
>>>
>>>
>>> this is what we use for customization...
>>> Our samples intended for academic purposes gathered as proof of concept
>>> on several commercial projects:
>>>     https://github.com/moljac/MonoTouch.Samples
>>> Cutom cell - the best sample (mostly used to show our teammates):
>>> UITableViewCellCustomVersionInitial, where
>>> we needed Cells in the same list, but different appearance based on
>>> Business Object types...
>>> UIViews are loaded from xibs... (Samples with xibless will be added)
>>> UITableViewCellTestGeneric is construction site with API added to have
>>> more generic Cell
>>>
>>> This cell is added into our MonoMobile.Dialog repo as extension:
>>>     https://github.com/moljac/MonoMobile.Dialog
>>>
>>> BTW
>>>     MTD (Miguel)
>>>
>>>             public override UITableViewCell GetCell (UITableView tv)
>>>
>>>     MAD (Kevin McMahon)
>>>
>>>             public override View GetView(Context context, View convertView, 
>>> ViewGroup parent)
>>>
>>>
>>>
>>> HTH
>>>
>>> mel
>>>
>>>
>>>  I couldn't find this signature from my current version of MonoTouch
>>> (latest). I would just need to call Element.GetCell()
>>> method the first time that my app is running (it only works when I
>>> redraw the display)
>>>
>>>
>>>  Thanks in advance
>>>
>>> http://fastchicken.co.nz/2012/05/20/earnest-debrief-visual-styles-in-ios-apps-uiappearence-custom-sections-in-monotouch-dialog/
>>>
>>>  Juan M Gómez
>>> @_jmgomez_
>>> Software Engineer
>>>
>>>
>>>
>>>  _______________________________________________
>>> MonoTouch mailing 
>>> [email protected]http://lists.ximian.com/mailman/listinfo/monotouch
>>>
>>>
>>>
>>> --
>>> Miljenko Cvjetko dipl.ing. ET
>>>     Direktor/CEO
>>>     Projektant rješenja/Solution Architect  
>>>     Razvojni programer/Senior developer
>>>     Voditelj projekta/Project Manager
>>>
>>> IX južna obala 13
>>> Kajzerica Zagreb
>>> T: 385 1 7775555
>>> M: 385 91 557 447 3
>>> F: 385 1 7779556
>>> e: [email protected]
>>> w: http://holisticware.net
>>>
>>>
>>
>>
>> --
>> Miljenko Cvjetko dipl.ing. ET
>>      Direktor/CEO
>>      Projektant rješenja/Solution Architect  
>>      Razvojni programer/Senior developer
>>      Voditelj projekta/Project Manager
>>
>> IX južna obala 13
>> Kajzerica Zagreb
>> T: 385 1 7775555
>> M: 385 91 557 447 3
>> F: 385 1 7779556
>> e: [email protected]
>> w: http://holisticware.net
>>
>>
>
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to