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
A Dummy takes a lot of help
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="morpheus_xx" data-source="post: 1003226" data-attributes="member: 48495"><p>Hi BigGranu, don't worry, it will work soon. MP2 is different, but once you get the first results it will be easier <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite24" alt="(y)" title="Thumbs Up (y)" loading="lazy" data-shortname="(y)" /></p><p> </p><p>About your question: without knowing the full xaml file, I guess about following possible causes:</p><ul> <li data-xf-list-type="ul">The "DataContext" of the xaml element where you use the binding is not set to your backing model. For example see the simple weather screen:<ul> <li data-xf-list-type="ul">Here the model ID gets declared for usage: <a href="https://github.com/MediaPortal/MediaPortal-2/blob/dev/MediaPortal/Source/UI/UiComponents/Weather/Skin/default/screens/weather.xaml#L12-L13" target="_blank">https://github.com/MediaPortal/MediaPortal-2/blob/dev/MediaPortal/Source/UI/UiComponents/Weather/Skin/default/screens/weather.xaml#L12-L13</a></li> <li data-xf-list-type="ul">Then the StackPanel sets its DataContext to this model: <a href="https://github.com/MediaPortal/MediaPortal-2/blob/dev/MediaPortal/Source/UI/UiComponents/Weather/Skin/default/screens/weather.xaml#L17-L18" target="_blank">https://github.com/MediaPortal/MediaPortal-2/blob/dev/MediaPortal/Source/UI/UiComponents/Weather/Skin/default/screens/weather.xaml#L17-L18</a></li> <li data-xf-list-type="ul">Finally the Items of a List are use like you did: <a href="https://github.com/MediaPortal/MediaPortal-2/blob/dev/MediaPortal/Source/UI/UiComponents/Weather/Skin/default/screens/weather.xaml#L92-L95" target="_blank">https://github.com/MediaPortal/MediaPortal-2/blob/dev/MediaPortal/Source/UI/UiComponents/Weather/Skin/default/screens/weather.xaml#L92-L95</a></li> </ul></li> <li data-xf-list-type="ul">If you've set your DataContext already, another cause could be that the model is not registered and thus not known to MP2:<ul> <li data-xf-list-type="ul">Check your plugin.xml if your model is registered, take Weather's plugin.xml as example: <a href="https://github.com/MediaPortal/MediaPortal-2/blob/dev/MediaPortal/Source/UI/UiComponents/Weather/plugin.xml#L21-L25" target="_blank">https://github.com/MediaPortal/MediaPortal-2/blob/dev/MediaPortal/Source/UI/UiComponents/Weather/plugin.xml#L21-L25</a></li> </ul></li> </ul><p>Please ask more questions, it will also help new developers to understand MP2's architecture!</p></blockquote><p></p>
[QUOTE="morpheus_xx, post: 1003226, member: 48495"] Hi BigGranu, don't worry, it will work soon. MP2 is different, but once you get the first results it will be easier (y) About your question: without knowing the full xaml file, I guess about following possible causes: [LIST] [*]The "DataContext" of the xaml element where you use the binding is not set to your backing model. For example see the simple weather screen: [LIST] [*]Here the model ID gets declared for usage: [url]https://github.com/MediaPortal/MediaPortal-2/blob/dev/MediaPortal/Source/UI/UiComponents/Weather/Skin/default/screens/weather.xaml#L12-L13[/url] [*]Then the StackPanel sets its DataContext to this model: [url]https://github.com/MediaPortal/MediaPortal-2/blob/dev/MediaPortal/Source/UI/UiComponents/Weather/Skin/default/screens/weather.xaml#L17-L18[/url] [*]Finally the Items of a List are use like you did: [url]https://github.com/MediaPortal/MediaPortal-2/blob/dev/MediaPortal/Source/UI/UiComponents/Weather/Skin/default/screens/weather.xaml#L92-L95[/url] [/LIST] [*]If you've set your DataContext already, another cause could be that the model is not registered and thus not known to MP2: [LIST] [*]Check your plugin.xml if your model is registered, take Weather's plugin.xml as example: [url]https://github.com/MediaPortal/MediaPortal-2/blob/dev/MediaPortal/Source/UI/UiComponents/Weather/plugin.xml#L21-L25[/url] [/LIST] [/LIST] Please ask more questions, it will also help new developers to understand MP2's architecture! [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Plugin Development
A Dummy takes a lot of help
Contact us
RSS
Top
Bottom