MCML Layout
Home › Forums › HTPC Software › Developers Corner › MCML Layout
- This topic has 11 replies, 2 voices, and was last updated 4 years, 3 months ago by sanjupawar.
-
AuthorPosts
-
June 1, 2012 at 7:14 pm #26662
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.
June 1, 2012 at 7:19 pm #32496NmarconiHere’s a screenshot of the idea …
June 1, 2012 at 7:35 pm #32497KirbyCant 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 (1920×1080) image?
June 1, 2012 at 7:42 pm #32498NmarconiYup, 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.
June 2, 2012 at 10:05 pm #32501Aaron LedgerUnfortunately, 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.
June 2, 2012 at 10:31 pm #32502mikinhoI 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>
June 4, 2012 at 5:10 am #32504NmarconiAh, 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>
June 4, 2012 at 5:14 am #32505Nmarconi[quote=mikinho]
I can help. If you want to send me what you are using now I can fix it up.
[/quote]
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.
June 4, 2012 at 3:12 pm #32507mikinho[quote=Nmarconi]
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.
[/quote]
I’ll be happy to help, just let me know.
That would be Yammm…v2 is in Beta w/ Ceton Companion Services.
February 28, 2013 at 10:32 pm #32881NmarconiHi 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.
March 7, 2013 at 4:28 am #32883mikinhoThe 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
July 21, 2020 at 12:42 pm #121528Thanks…..
-
AuthorPosts
- You must be logged in to reply to this topic.