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="Albert" data-source="post: 788983" data-attributes="member: 67886"><p><strong>AW: HOW TO: Create a simple media list interface</strong></p><p></p><p>Now I got time to test it.</p><p></p><p>If you use mouse scrolling, it works in any case.</p><p>If you want to use keyboard scrolling, you need to set Focusable="True" at the ListViewitems or at the ItemsHost panel (not at the ListView, sorry, that was wrong).</p><p></p><p>I use this screen for the test:</p><p></p><p>[CODE]</p><p><Screen</p><p> xmlns="www.team-mediaportal.com/2008/mpf/directx"</p><p> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"></p><p> <DockPanel LastChildFill="False"></p><p> <ListView Background="Yellow" Width="300" Height="300" DockPanel.Dock="Center"</p><p> HorizontalAlignment="Center" VerticalAlignment="Center"></p><p> <ListViewItem Focusable="True"></p><p> <WrapPanel> </p><p> <Image Margin="0,0,14,0" Source="viewed.png" /></p><p> <Image VerticalAlignment="Bottom" Margin="0,0,14,0" Source="divx.png" /> </p><p> <Label Content="Choix 1"/> </p><p> </WrapPanel></p><p> </ListViewItem></p><p> <ListViewItem Focusable="True"></p><p> <WrapPanel> </p><p> <Image Width="30" Margin="0,0,14,0" Source="inprogress.png" /></p><p> <Image VerticalAlignment="Bottom" Margin="0,0,14,0" Source="dvd.png" /> </p><p> <Label Content="Choix 1"/> </p><p> </WrapPanel></p><p> </ListViewItem></p><p> </ListView></p><p> </DockPanel></p><p></Screen></p><p>[/CODE]</p><p></p><p>Note that the size of the ListViewItems in relation to the ItemsHost panel of the ListView is important: The ListViewItems are contained in the ItemsHost panel, which is a StackPanel in the default ListView style. StackPanels cannot show items which are bigger than their own size in MP2. That's due to our limitation we cannot clip the children to the StackPanel's bounds. If we would show elements inside a StackPanel which are bigger than the panel, the elements would take more space than the StackPanel.</p><p></p><p>So take care that in every scroll position, at least one complete ListViewItem can be shown by the StackPanel.</p><p></p><p>Alternatively to show ListViewItems which are bigger than your ListView, you can set CanContentScroll="False" on the ScrollViewer which is used in the ListView style. But to do that, you need to set a custom style.</p><p></p><p>The reason why the scrolling is so difficult in MP2 is because when you don't use a mouse, the only means to trigger the scrolling is the keyboard arrows. And those keys only can work on a control which has keyboard focus. If the ScrollViewer wouldn't check the keyboard focus and you had more than one ScrollViewer in your screen, all ScrollViewers would scroll at the same time.</p></blockquote><p></p>
[QUOTE="Albert, post: 788983, member: 67886"] [b]AW: HOW TO: Create a simple media list interface[/b] Now I got time to test it. If you use mouse scrolling, it works in any case. If you want to use keyboard scrolling, you need to set Focusable="True" at the ListViewitems or at the ItemsHost panel (not at the ListView, sorry, that was wrong). I use this screen for the test: [CODE] <Screen xmlns="www.team-mediaportal.com/2008/mpf/directx" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <DockPanel LastChildFill="False"> <ListView Background="Yellow" Width="300" Height="300" DockPanel.Dock="Center" HorizontalAlignment="Center" VerticalAlignment="Center"> <ListViewItem Focusable="True"> <WrapPanel> <Image Margin="0,0,14,0" Source="viewed.png" /> <Image VerticalAlignment="Bottom" Margin="0,0,14,0" Source="divx.png" /> <Label Content="Choix 1"/> </WrapPanel> </ListViewItem> <ListViewItem Focusable="True"> <WrapPanel> <Image Width="30" Margin="0,0,14,0" Source="inprogress.png" /> <Image VerticalAlignment="Bottom" Margin="0,0,14,0" Source="dvd.png" /> <Label Content="Choix 1"/> </WrapPanel> </ListViewItem> </ListView> </DockPanel> </Screen> [/CODE] Note that the size of the ListViewItems in relation to the ItemsHost panel of the ListView is important: The ListViewItems are contained in the ItemsHost panel, which is a StackPanel in the default ListView style. StackPanels cannot show items which are bigger than their own size in MP2. That's due to our limitation we cannot clip the children to the StackPanel's bounds. If we would show elements inside a StackPanel which are bigger than the panel, the elements would take more space than the StackPanel. So take care that in every scroll position, at least one complete ListViewItem can be shown by the StackPanel. Alternatively to show ListViewItems which are bigger than your ListView, you can set CanContentScroll="False" on the ScrollViewer which is used in the ListView style. But to do that, you need to set a custom style. The reason why the scrolling is so difficult in MP2 is because when you don't use a mouse, the only means to trigger the scrolling is the keyboard arrows. And those keys only can work on a control which has keyboard focus. If the ScrollViewer wouldn't check the keyboard focus and you had more than one ScrollViewer in your screen, all ScrollViewers would scroll at the same time. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Plugin Development
HOW TO: Create a simple media list interface
Contact us
RSS
Top
Bottom