Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic "The Default Cell Template" (dev-guide) (Read 2972 times)
springy
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 76
Joined: Jan 25th, 2010
"The Default Cell Template" (dev-guide)
Feb 12th, 2010 at 10:52am
Print Post  
What I miss from the docs: How is StyleKey=Today being rendered?

As I found out by trial is that the cell is created twice: Below the cell with StyleKey=WithHeader and on top another cell with StyleKey=Today -- but there the HeaderText always returns "1", not the correct day.

I also have problems in understanding how MonthSettings.DaySettings.HeaderPosition != Top gets applied -- is this a pure Margin thing?
(BTW: The holiday sample really looks strange with HeaderPosition != top)

Another thing: The display position of items: Is this a hardcoded behavior? I think it would be more elegant if one could place some sort of ItemPresenter or a special named container whereever you want inside the ControlTemplate.
  

/\/\arkus.
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: "The Default Cell Template" (dev-gui
Reply #1 - Feb 12th, 2010 at 12:06pm
Print Post  
Quote:
As I found out by trial is that the cell is created twice: Below the cell with StyleKey=WithHeader and on top another cell with StyleKey=Today -- but there the HeaderText always returns "1", not the correct day.

That's exactly the case - the cell representing the current day is superimposed over the ordinary cell of the day. The wrong HeaderText is a bug. We will fix it.

Quote:
I also have problems in understanding how MonthSettings.DaySettings.HeaderPosition != Top gets applied -- is this a pure Margin thing?
(BTW: The holiday sample really looks strange with HeaderPosition != top)

The HeaderPosition property is translated into four properties within the cell presenter which define the size and alignment of the header element - HeaderWidth, HeaderHeight, HeaderHorizontalAlignment and HeaderVerticalAlignment. You can see those being bound to in the default cell template. The Holiday sample deliberately disregards these properties so that the custom cell template presented there is kept simpler.

Quote:
Another thing: The display position of items: Is this a hardcoded behavior? I think it would be more elegant if one could place some sort of ItemPresenter or a special named container whereever you want inside the ControlTemplate.

The area where the items are laid out is calculated automatically and is view dependent. For example, in views with headered cells, this area is the union of all cells in each row excluding the cell headers. The item layout behavior cannot be manipulated directly at this time because it is rather complex and we haven't figured an acceptable mechanism to expose it to the client.

I hope this helps.

Regards,
Meppy
  
Back to top
 
IP Logged
 
springy
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 76
Joined: Jan 25th, 2010
Re: "The Default Cell Template" (dev-gui
Reply #2 - Feb 12th, 2010 at 12:09pm
Print Post  
Quote:
I also have problems in understanding how MonthSettings.DaySettings.HeaderPosition != Top gets applied -- is this a pure Margin thing?
(BTW: The holiday sample really looks strange with HeaderPosition != top)


Found it: Header[H/V]Alignment. The holiday sample just uses the full size of the cell and although HeaderVerticalAlignment is used there for a border, since the border is in an auto-height grid-row it has no effect at all.
  

/\/\arkus.
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint