The Media Center Sandbox

Resources and discussion for developing experiences in the Windows Media Center platform.
Welcome to The Media Center Sandbox Sign in | Join | Help
in Search

Layouts basics

Last post 08-23-2010, 12:17 PM by shrap. 6 replies.
Sort Posts: Previous Next
  •  08-17-2010, 12:00 PM 9815

    Layouts basics

    Well, after month or two I realized I absolutelly don't understand mcml basics. Can anyone post here a simple example of layout that contains only one ColorFill object with some color and fills whole screen? Thanks.
  •  08-17-2010, 10:56 PM 9817 in reply to 9815

    Re: Layouts basics

    ColorFill Layout="Fill" Content="Blue"

    Cheers,
    Andrew
  •  08-18-2010, 1:41 PM 9824 in reply to 9817

    Re: Layouts basics

    Well, I figured this out in the end, but still, I don't get the results I need. Here's a layout I would like to achieve: http://shrap.net/wmc/layout.png
    I would like to make it with relative values (no MinimumSize if possible) and that's probably the problem. Or maybe I don't have to worry and can use absolute positioning? But I guess there would be a problem on 4:3 screens right? Anyway, if you can create a layout according to the picture I posted, I'l be glad. Thanks.

    shrap

    edit: The yellow box has strict dimensions (150x100 px or something like that).
  •  08-18-2010, 11:07 PM 9826 in reply to 9824

    Re: Layouts basics

    Here you go:

    http://www.digitallivingsolutions.co.uk/examples/Blocks.zip

    The example uses no MinimumSize (except on the yellow block which you said has strict dimensions) and all other sizing relative to each other and the page size.

    I had to guess the relationship between the blocks so I may have got some of them wrong, but you should get the idea from the example.

    Cheers,
    Andrew
  •  08-19-2010, 12:26 AM 9827 in reply to 9826

    Re: Layouts basics

    Thanks Andrew, it's great! I'll try to put it in my app and see what happens :) One interesting thing is it looks almost as my code, it makes perfectly sense (like my code :) but the result is completely different (your code works, mine not :) Anyway, thanks again.

    shrap
  •  08-23-2010, 7:42 AM 9833 in reply to 9827

    Re: Layouts basics

    Layouts are (I think) really tough to get your head around - the biggest issue is that if you get your layout dimensions wrong, parts of your layout may just not show at all.

    Cheers,
    Andrew
  •  08-23-2010, 12:17 PM 9834 in reply to 9833

    Re: Layouts basics

    Uff, I finally won my war. I used docking layout in the end, because I wasn't able to make it looks as I wanted it. And the layout was, of course, quite complicated than the picture I posted, some minimal/maximal size restriction etc. Anyway, it's more or less done so I can move to another issue (will start new thread for that).

    regards
    Shrap
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems