Plugin support | Page 2

Discussion in 'BlueVision' started by ge2301, April 24, 2015.

  1. ge2301
    • Team MediaPortal

    ge2301 MP2 Design

    Joined:
    January 11, 2014
    Messages:
    6,216
    Likes Received:
    1,565
    Gender:
    Male
    Occupation:
    Automotive Industry
    Location:
    Stuttgart (But living abroad)
    Ratings:
    +2,355 / 2
    Home Country:
    Germany Germany
    If I understood you correctly I did so. I'm only working in the Bluevision skin folder of OV2 plugin.



    In ovsSiteMangement.xaml there is this code (and I see the logo in the options view):
    HTML:
    1.                     <Image DockPanel.Dock="Right" Stretch="Uniform" VerticalAlignment="Top"
    2.                           Source="{Binding ElementName=siteslist, Path=CurrentItem, Converter={ThemeResource ovsSiteUtilIconConverter}}"/>
    I tried to copy exactly the same code to sites.xaml and it does not show a logo. I considered the resources as you see below in the complete code of sites.xaml:
    HTML:
    1. <?xml version="1.0" encoding="utf-8"?>
    2. <Include
    3.    xmlns="www.team-mediaportal.com/2008/mpf/directx"
    4.    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    5.    xmlns:ovs="clr-namespace:OnlineVideos.MediaPortal2;assembly=OnlineVideos.MediaPortal2"
    6.    Source="screens\master_bare.xaml">
    7.   <Include.Resources>
    8.  
    9.     <Model x:Key="OnlineVideosModel" Id="C418243F-5BD3-4637-8871-DA6545387929"/>
    10.     <ovs:SiteUtilIconConverter x:Key="ovsSiteUtilIconConverter"/>
    11.  
    12.     <!-- Contents -->
    13.     <ControlTemplate x:Key="Client_Template">
    14.       <DockPanel DataContext="{Binding Source={StaticResource OnlineVideosModel}}" LastChildFill="true">
    15.  
    16.         <ListView x:Name="siteslist" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" DockPanel.Dock="Center"
    17.                  Style="{ThemeResource ovsSitesListViewStyle}" Margin="-30, 0,-45,-5"
    18.                  CurrentItem="{Binding Path=FocusedSite, Mode=OneWayToSource}"
    19.                  ItemsSource="{Binding Path=SitesList}" SetFocusPrio="RestoreState"/>
    20.  
    21.         <StackPanel Orientation="Vertical" DockPanel.Dock="Center" VerticalAlignment="Bottom" Margin="0,625,0,-625" >
    22.  
    23.           <Image  Stretch="Uniform" VerticalAlignment="Top"
    24.                 Source="{Binding ElementName=siteslist, Path=CurrentItem, Converter={ThemeResource ovsSiteUtilIconConverter}}"/>
    25.  
    26.           <Label Color="{ThemeResource TextColor}"
    27.                   HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
    28.                   DataContext="{Binding ElementName=siteslist,Path=CurrentItem}" Content="{Binding Path=Name}" />
    29.           <Label Color="{ThemeResource TextColor}" Opacity="0.6"
    30.                   HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Wrap="True" Scroll="Auto"
    31.                   DataContext="{Binding ElementName=siteslist,Path=CurrentItem}"
    32.                   Content="{Binding Description}" />
    33.        
    34.         </StackPanel>
    35.  
    36.       </DockPanel>
    37.     </ControlTemplate>
    38.   </Include.Resources>
    39. </Include>
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. morpheus_xx
    • Team MediaPortal

    morpheus_xx Lead Dev MP2

    Joined:
    March 24, 2007
    Messages:
    11,065
    Likes Received:
    4,760
    Ratings:
    +6,814 / 11
    Home Country:
    Germany Germany
    Show System Specs
    Ah ok. Then we need to check OV2 itself.

    From your both quotes (without checking xaml) I guess the two screens are using different backing models, so properties might be different. Are the Model-ID and the DataContext of the controls the same in both screens?
     
  4. ge2301
    • Team MediaPortal

    ge2301 MP2 Design

    Joined:
    January 11, 2014
    Messages:
    6,216
    Likes Received:
    1,565
    Gender:
    Male
    Occupation:
    Automotive Industry
    Location:
    Stuttgart (But living abroad)
    Ratings:
    +2,355 / 2
    Home Country:
    Germany Germany
    The datacontext is different.
    The ovsSiteManagement.xaml uses DataContext="{Binding Source={StaticResource ovsSiteManagerModel}}"
    The Sites.xaml uses DataContext="{Binding Source={StaticResource OnlineVideosModel}}"

    EDIT:
    Also OnlineVideosStyle.xaml uses the same code to show the image and there its starting with: <DataTemplate x:Key="ovsOnlineSiteItemDataTemplate" DataType="{x:Type ovs:OnlineSiteViewModel}">
     
    Last edited: April 27, 2015
  5. ge2301
    • Team MediaPortal

    ge2301 MP2 Design

    Joined:
    January 11, 2014
    Messages:
    6,216
    Likes Received:
    1,565
    Gender:
    Male
    Occupation:
    Automotive Industry
    Location:
    Stuttgart (But living abroad)
    Ratings:
    +2,355 / 2
    Home Country:
    Germany Germany
    In OV it was quite easy to change the button style, because it can be defined in ovsSiteItemContainerStyle.
    HTML:
    1.     <Style x:Key="ovsSitesListViewStyle" TargetType="{x:Type ListView}">
    2.         <Setter Property="Template" Value="{ThemeResource ovsListViewTemplate}"/>
    3.         <Setter Property="ItemsPanel">
    4.             <Setter.Value>
    5.                 <ItemsPanelTemplate>
    6.                     <WrapPanel IsItemsHost="True" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="{ResolutionResource ovsSitesPanelMargin}"/>
    7.                 </ItemsPanelTemplate>
    8.             </Setter.Value>
    9.         </Setter>
    10.         <Setter Property="ItemTemplate" Value="{ThemeResource ovsSiteItemDataTemplate}"/>
    11.         <Setter Property="ItemContainerStyle" Value="{ThemeResource ovsSiteItemContainerStyle}"/>
    12.         <Setter Property="DataStringProvider" Value="{ThemeResource DefaultItemDataStringProvider}"/>
    13.     </Style>
    For news there is no style setter. Changing the "BasedOn" does not work.
    HTML:
    1.   <Style x:Key="NewsFeedsContainerStyle" BasedOn="{ThemeResource MenuListViewStyle}">
    2.     <Setter Property="ItemTemplate" Value="{ThemeResource NewsFeedDataTemplate}" />
    3.   </Style>
    How can I switch to the framed focus button? :unsure: Added a second setter "ItemContainerStyle" and adding a to OV comparable code behind made MP2 fall back to standard skin.
     
  6. ge2301
    • Team MediaPortal

    ge2301 MP2 Design

    Joined:
    January 11, 2014
    Messages:
    6,216
    Likes Received:
    1,565
    Gender:
    Male
    Occupation:
    Automotive Industry
    Location:
    Stuttgart (But living abroad)
    Ratings:
    +2,355 / 2
    Home Country:
    Germany Germany
    @morpheus_xx
    I installed the latest version of WebRadio for MP2. With Titanum skin it seems to work well. With BlueVision it is veeery slow and generating lot's of failures :( A few times I had to close MP2 by task manager.
    I was going to create a BV specific skin, since I like this plugin. But at first it should be clarified why it's causing trouble with BV. I checked also ApolloOne, it's the same problem. Do you have an idea from the logs. I thought it's better to ask you first instead of contacting BigGranu, who can most probably not say too much about BV.
     
  7. Holzi
    • Team MediaPortal

    Holzi Super Moderator

    Joined:
    April 21, 2010
    Messages:
    7,928
    Likes Received:
    1,591
    Gender:
    Male
    Location:
    Ba-Wü
    Ratings:
    +2,228 / 8
    Home Country:
    Germany Germany
    Show System Specs
  8. ge2301
    • Team MediaPortal

    ge2301 MP2 Design

    Joined:
    January 11, 2014
    Messages:
    6,216
    Likes Received:
    1,565
    Gender:
    Male
    Occupation:
    Automotive Industry
    Location:
    Stuttgart (But living abroad)
    Ratings:
    +2,355 / 2
    Home Country:
    Germany Germany
  9. morpheus_xx
    • Team MediaPortal

    morpheus_xx Lead Dev MP2

    Joined:
    March 24, 2007
    Messages:
    11,065
    Likes Received:
    4,760
    Ratings:
    +6,814 / 11
    Home Country:
    Germany Germany
    Show System Specs
    I fixed the issue. Reason was an empty ListView style, which lead to using a non-virtualization StackPanel. For the huge list of >10.000 web radio stations it causes a big performance issue.

    I've added missing styles to BlueVision, same changes still must be done for ApolloOne!
     
    Last edited: May 31, 2015
    • Thank You! Thank You! x 2
  10. morpheus_xx
    • Team MediaPortal

    morpheus_xx Lead Dev MP2

    Joined:
    March 24, 2007
    Messages:
    11,065
    Likes Received:
    4,760
    Ratings:
    +6,814 / 11
    Home Country:
    Germany Germany
    Show System Specs
    @ge2301 I think it's mandatory to move the plugin-dependent styles out of BlueVision plugin folder.

    Once you have styles for OnlineVideos included, but don't have the plugin installed (like I have here), you cannot use BlueVision anymore, because of missing dependencies in styles. A fallback to "Default" then happens.

    This means, at least for all plugins which are not part of core installation, the styles must be placed in the plugin which needs them. Exceptions could be allowed for the inbuilt and used plugins like Weather and News (because we use them directly in HomeModel and should have clear references to them inside plugin.xml). But the real clean way would be to place all styles in their respective plugin.
     
  11. ge2301
    • Team MediaPortal

    ge2301 MP2 Design

    Joined:
    January 11, 2014
    Messages:
    6,216
    Likes Received:
    1,565
    Gender:
    Male
    Occupation:
    Automotive Industry
    Location:
    Stuttgart (But living abroad)
    Ratings:
    +2,355 / 2
    Home Country:
    Germany Germany
    Oh, I'll move them out. The question is only where in GitHub I push them. I guess just to offer them seperately from the plugin for download is also not the ideal way.
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!