MCML Layout

11 posts / 0 new
Last post
Offline
Joined: 17 Aug 2010
MCML Layout

Hi, my name is Nate - I am a .Net programmer by trade and a HTPC Enthusiest (medio -> popcorn hour -> xbmc -> WMC 7).  I recently added a ceton card and am loving it.  I am not a fan of the Recorded TV section and am writing an add-in to replace it (Mostly i want an "New" flag and a Plex-style On Deck).  I know about Recorded TV HD - but i want something a bit different and figured it would be a good learning experience anyway.  The back-end libraries/DB are all set.  Working on the MCML now, and wow it is maddening.  The layout options just do not make sense to me.  I hate that everything seems to size to children.  Does anyone out there have a solid grasp on MCML layouts that can offer some help?  Here is an example of a problem i am having.  The UI is a Metro style UI.  I wrote a list UI control.  It works great.  However, i want the selected item to have a colorfill background.  No problem.  But i want the selection bar to fill the entirety of the horizontal space given to it from the parent (Form Layout).  Is this possible?  It doesnt seem to be - i cant get it to work.  The color fill will only ever extend as far as the text.  I am tempted to just go XBMC skin style and code everything to a 1080p resolution rather than using percentages.

Offline
Joined: 17 Aug 2010

Here's a screenshot of the idea ...

Offline
Joined: 9 Sep 2011

Cant really answer your questions as I have not ever tried to program in MCML, but this looks very nice and if you need someone to help test for bugs, let me know.  Is that a scaled down fanart (1920x1080) image?  

Offline
Joined: 17 Aug 2010

 

Yup, that's a scaled down fanart.  That layout is correct (but the details under will be the episode details - not show details - thats just a mockup - but i acutally have the MCML working other than the silly selection bar)  But it is very close to how i want it to look.

All the data is retrieved from thetvdb.com including the fanart.  The data is stored in a MS SQL CE database (though i am using a provider model so i could easily add a different storage backend).  I already wrote a companion app that can be used to manage the metadata.  It can scan for wtv files or any other file type (as long as i write a class to do it).  It's also a centralized database - so you can use multiple devices to provide content if you want.

As far as testers - i am still a ways off.  But i will post back here when i am ready for that.

 

Aaron Ledger's picture
Offline
Joined: 6 Aug 2010

Unfortunately, I have never taken to learning much about MCML other than looking through the paltry SDK/documentation that MS made available. IIRC, I haven't seen any other developers use the exact color fill type of scheme you are going for. I think you can essentially do what you are trying to do with a WMC button style which gives that highlighted, 3D effect instead of the color fill you are going for.

Senior Editor | @swoon_

mikinho's picture
Offline
Joined: 19 Mar 2007

I can help. If you want to send me what you are using now I can fix it up.

The basic idea is that you create a colorfill around the text that is set to fill the parent object.  You can do that a few different ways, (Anchor, Grid, VerticalFlow, Form, etc)

 

i.e.

<LayoutInput>

    <FormLayoutInput Left="Parent,0" Top="Parent,0" Horizontal="Fill" />

</LayoutInput>

Mikinho | Missing Remote | Windows Entertainment and Connected Home MVP

Offline
Joined: 17 Aug 2010

Ah, nice, got it working.  My problem was with the grid layout i was using in my repeater.  I was missing the Major and Minor Alignment settings.

 

        <Layout>
            <GridLayout Orientation="Vertical"
                        Columns="1"
                        AllowWrap="true"
                        Spacing="0,5"
                        MajorAlignment="Fill"
                        MinorAlignment="Fill"/>

        </Layout>

Offline
Joined: 17 Aug 2010

mikinho wrote:

I can help. If you want to send me what you are using now I can fix it up.

Thanks for the help.  I still will probably need some help, so ill post back here when that happens.  PS - i think i use a service you wrote to scrape themoviedb.org for xbmc nfo files.

mikinho's picture
Offline
Joined: 19 Mar 2007

Nmarconi wrote:

Thanks for the help.  I still will probably need some help, so ill post back here when that happens.  PS - i think i use a service you wrote to scrape themoviedb.org for xbmc nfo files.

I'll be happy to help, just let me know.

That would be Yammm...v2 is in Beta w/ Ceton Companion Services.

Mikinho | Missing Remote | Windows Entertainment and Connected Home MVP

Offline
Joined: 17 Aug 2010

Hi Michael,

I am working an a project for WMC that grabs schedule data for premium channels, goes out to rotten tomatoes (via api), and selects movies to record based on filter criteria, sets up the recording, moves the file to a server.  Then there are 3 UI screens (Library, Scheduled to Record, Scheduled to Skip).  Obviously, it's more complicated that that, but that is the basic idea.

Everything seems to be all set, but i am getting the guide data in a way that violates the content provider TOS, so i cant distribute the program.  Do you know a decent way to get guide data?  You are doing it somehow for companion services, right?  I looked into using the provider for Myth, but it costs money now.

mikinho's picture
Offline
Joined: 19 Mar 2007

The Media Center SDK has depreciated APIs for searching the guide based on title.  They have some restrictions but if you use some reasonable limits it should do the trick.  Download the Vista Media Center SDK to see the usage or refer to TVSchedule.FindProgram.  It is fairly limiting but if you are using the Rotten Tomatoe's API for finding movies then you should be able to do a title only search.

Hope this helps.

-Michael

Mikinho | Missing Remote | Windows Entertainment and Connected Home MVP

Login or register to post comments
Website design by Yammm Software
Powered by Drupal