home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 2
Plugin Development
HOW TO: Create a simple media list interface
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="celesta" data-source="post: 781372" data-attributes="member: 110975"><p><strong><u>1. Create a screen tag (this is always that):</u></strong></p><p>[CODE][COLOR="SeaGreen"]<Screen xmlns="www.team-mediaportal.com/2008/mpf/directx" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"></p><p></Screen>[/COLOR][/CODE]</p><p></p><p><strong><u>2. The screen can only create one component, for example i use a DockPanel:</u></strong></p><p>[CODE][COLOR="SeaGreen"]<Screen xmlns="www.team-mediaportal.com/2008/mpf/directx" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"></p><p> [COLOR="SandyBrown"]<DockPanel></p><p> </DockPanel>[/COLOR]</p><p></Screen>[/COLOR][/CODE]</p><p></p><p><strong><u>3. Inside it use a ListViewItem:</u></strong></p><p>Style="{ThemeResource ListViewStyle}" must be used in ListView ? to use the display of the current theme ?</p><p></p><p>[CODE][COLOR="SeaGreen"]<Screen xmlns="www.team-mediaportal.com/2008/mpf/directx" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"></p><p> <DockPanel></p><p> [COLOR="SandyBrown"]<ListView Style="{ThemeResource ListViewStyle}"></p><p> <ListViewItem> <Label Content="Choice 1"/> </ListViewItem></p><p> <ListViewItem> <Label Content="Choice 2"/> </ListViewItem></p><p> <ListViewItem> <Label Content="Choice 3"/> </ListViewItem></p><p> </ListView>[/COLOR]</p><p> </DockPanel></p><p></Screen>[/COLOR][/CODE]</p><p></p><p></p><p>Now nothing work ... I think this is because you must "inherit" from skin stuff</p><p></p><p></p><p><strong><u>4. Add Ressources</u></strong></p><p></p><p>[CODE][COLOR="SeaGreen"]<Screen xmlns="www.team-mediaportal.com/2008/mpf/directx" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"></p><p> <DockPanel></p><p> </p><p> [COLOR="SandyBrown"]<DockPanel.Resources></p><p> <DataTemplate x:Key="ItemDataTemplate"></p><p> <Label x:Name="ItemDataLabel" Content="{Binding}" FontSize="{ThemeResource SmallFontSize}" Color="Blue"/></p><p> </DataTemplate></p><p> <Style x:Key="ListViewStyle" BasedOn="{ThemeResource DefaultListViewStyle}"></p><p> <Setter Property="ItemTemplate" Value="{ThemeResource ItemDataTemplate}"/></p><p> <Setter Property="ItemContainerStyle" Value="{ThemeResource DefaultMenuItemContainerStyle}"/></p><p> </Style></p><p> </DockPanel.Resources>[/COLOR]</p><p> </p><p> <ListView Style="{ThemeResource ListViewStyle}"></p><p> <ListViewItem> <Label Content="Choice 1"/> </ListViewItem></p><p> <ListViewItem> <Label Content="Choice 2"/> </ListViewItem></p><p> <ListViewItem> <Label Content="Choice 3"/> </ListViewItem></p><p> </ListView></p><p> </DockPanel></p><p></Screen>[/COLOR][/CODE]</p><p></p><p></p><p>Wow! I can press up and down of the keyboard or use the mouse and if I create a lot of items, there is a scroolbar!</p><p>I don't understand very well the Ressources process.</p><p>Someone have any doc for this and why the ListView isn't display without style ?</p></blockquote><p></p>
[QUOTE="celesta, post: 781372, member: 110975"] [B][U]1. Create a screen tag (this is always that):[/U][/B] [CODE][COLOR="SeaGreen"]<Screen xmlns="www.team-mediaportal.com/2008/mpf/directx" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> </Screen>[/COLOR][/CODE] [B][U]2. The screen can only create one component, for example i use a DockPanel:[/U][/B] [CODE][COLOR="SeaGreen"]<Screen xmlns="www.team-mediaportal.com/2008/mpf/directx" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> [COLOR="SandyBrown"]<DockPanel> </DockPanel>[/COLOR] </Screen>[/COLOR][/CODE] [B][U]3. Inside it use a ListViewItem:[/U][/B] Style="{ThemeResource ListViewStyle}" must be used in ListView ? to use the display of the current theme ? [CODE][COLOR="SeaGreen"]<Screen xmlns="www.team-mediaportal.com/2008/mpf/directx" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <DockPanel> [COLOR="SandyBrown"]<ListView Style="{ThemeResource ListViewStyle}"> <ListViewItem> <Label Content="Choice 1"/> </ListViewItem> <ListViewItem> <Label Content="Choice 2"/> </ListViewItem> <ListViewItem> <Label Content="Choice 3"/> </ListViewItem> </ListView>[/COLOR] </DockPanel> </Screen>[/COLOR][/CODE] Now nothing work ... I think this is because you must "inherit" from skin stuff [B][U]4. Add Ressources[/U][/B] [CODE][COLOR="SeaGreen"]<Screen xmlns="www.team-mediaportal.com/2008/mpf/directx" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <DockPanel> [COLOR="SandyBrown"]<DockPanel.Resources> <DataTemplate x:Key="ItemDataTemplate"> <Label x:Name="ItemDataLabel" Content="{Binding}" FontSize="{ThemeResource SmallFontSize}" Color="Blue"/> </DataTemplate> <Style x:Key="ListViewStyle" BasedOn="{ThemeResource DefaultListViewStyle}"> <Setter Property="ItemTemplate" Value="{ThemeResource ItemDataTemplate}"/> <Setter Property="ItemContainerStyle" Value="{ThemeResource DefaultMenuItemContainerStyle}"/> </Style> </DockPanel.Resources>[/COLOR] <ListView Style="{ThemeResource ListViewStyle}"> <ListViewItem> <Label Content="Choice 1"/> </ListViewItem> <ListViewItem> <Label Content="Choice 2"/> </ListViewItem> <ListViewItem> <Label Content="Choice 3"/> </ListViewItem> </ListView> </DockPanel> </Screen>[/COLOR][/CODE] Wow! I can press up and down of the keyboard or use the mouse and if I create a lot of items, there is a scroolbar! I don't understand very well the Ressources process. Someone have any doc for this and why the ListView isn't display without style ? [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Plugin Development
HOW TO: Create a simple media list interface
Contact us
RSS
Top
Bottom