Bug Tracker
SourceForge
Feedback
Wiki
Stor
It is currently August 24th, 2017, 12:20 pm




 Page 1 of 2 [ 24 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: I'd like to convert the old media.movietimes.screen to XAML
PostMessage posted...: May 5th, 2010, 12:12 am 
User avatar
More than 500 posts
More than 500 posts
Developer

Joined: September 6th, 2006, 2:28 am
Posts: 506
Location: MA, USA
but I'm overwhelmed by my lack of understanding of how to develop with it :|
I know Visual Studio (2008) very well. I've been a GUI developer for most of my career, but only for C#, C++ (MFC, ATL, STL), ASP.NET, WinForms etc, but I've never used WPF or XAML. :(
I can't seem to get over the starting hump of xaml files for MeediOS.
I've read WPFUI: Creating themes (Advanced tips). I think it's a focus issue for me. Too much to start with.

Can anyone help me with a head start? I have the MovieTimes plugin working for MeediOS, but no screen for it :)


Attachments:
File comment: Here is an older Meedio version of the screen file.
media.moviestimes.rar [913 Bytes]
Downloaded 41 times
Offline
 Profile  
 
 Post subject:
PostMessage posted...: May 5th, 2010, 12:21 am 
User avatar
More than 6000 posts
More than 6000 posts

Joined: July 3rd, 2006, 1:25 pm
Posts: 6508
Location: UK
You might want to start with this basic guide.

http://www.meedios.com/EN/forum/viewtopic.php?t=5531



_________________
HTPC - xbmc eden/meedios, mce remote, 40gb intel ssd, i5, 4gb ram | Storage - 2 x qnap 8tb 419p+ NAS
Kitchen/Bar - Wall mounted Motorola Xoom tablet | Mobile - Ipad 2 | My setup pics
Offline
 Profile  
 
 Post subject:
PostMessage posted...: May 7th, 2010, 10:07 am 
User avatar
More than 6000 posts
More than 6000 posts

Joined: July 3rd, 2006, 1:25 pm
Posts: 6508
Location: UK
Any update on this?

What do you need help with?



_________________
HTPC - xbmc eden/meedios, mce remote, 40gb intel ssd, i5, 4gb ram | Storage - 2 x qnap 8tb 419p+ NAS
Kitchen/Bar - Wall mounted Motorola Xoom tablet | Mobile - Ipad 2 | My setup pics
Offline
 Profile  
 
 Post subject:
PostMessage posted...: May 12th, 2010, 10:48 pm 
User avatar
More than 500 posts
More than 500 posts
Developer

Joined: September 6th, 2006, 2:28 am
Posts: 506
Location: MA, USA
I'm still trying to become familiar with what xaml is and how it works; especially with respect to MeediOS and WPFUI.

I'm planning on using the MediaMovies_Detail screen from crn's Evolution theme as a starting point, and then trying make little changes. So far, it's a pretty steep learning curve.
There is a LOT of stuff in crn's MediaMovies.WPFUI.xaml, MediaMovies_Details.WPFUI.xaml and MediaMovies_Details_Panel.WPFUI.xaml to decipher :shock:
I've been looking at your "Theme Creation Guide" thread. I think once I look at it a few hundred more times, I should be able to figure it out :)

I'm a pretty visual person, and since resources are loaded by WPFUI and/or via the Source="pack://siteoforigin:..." directive while MeediOS is running, I can't view it in Blend or VS2008 while I'm changing it. This makes it a bit harder for me to learn.

Can you think of a better way for a head start?


Offline
 Profile  
 
 Post subject:
PostMessage posted...: May 15th, 2010, 7:32 pm 
User avatar
More than 2000 posts
More than 2000 posts
Developer

Joined: June 20th, 2006, 3:38 pm
Posts: 3550
Location: Germany
You can use Blend if
- you make WPFUI.dll (and all other dlls you reference) available: copy them into your Blend project folder.
- you make the theme's ResourceDictionary.xaml available the the *Screen.xaml files: Replace all those "pack://siteoforigin..." with absolute file Uris and add an absolute Uri to the theme's ResourceDictionary.xaml.

There's also an outdated VS project for this very matter.


Offline
 Profile  
 
 Post subject:
PostMessage posted...: May 16th, 2010, 10:05 pm 
User avatar
More than 500 posts
More than 500 posts
Developer

Joined: September 6th, 2006, 2:28 am
Posts: 506
Location: MA, USA
That's a lot of stuff to change in order to use it in Blend... I think I'll give the VS project a try first. I know my way around the VS IDE way better than Blend (which I just have a trial of).
Do you know the difference between WPFDefaultTheme and WPFTemplateTheme?


Offline
 Profile  
 
 Post subject:
PostMessage posted...: May 17th, 2010, 9:53 am 
User avatar
More than 1000 posts
More than 1000 posts

Joined: July 7th, 2009, 3:17 pm
Posts: 1151
artfulfox wrote:
Do you know the difference between WPFDefaultTheme and WPFTemplateTheme?
No. In fact I just learned about the existence of WPFTemplateTheme when I looked up the link to WPFDefaultTheme...



_________________
I'm a secondary account of the real one. All .rars ignored.
Offline
 Profile  
 
 Post subject:
PostMessage posted...: May 17th, 2010, 10:15 am 
User avatar
More than 500 posts
More than 500 posts

Joined: July 21st, 2006, 12:25 pm
Posts: 836
Location: Amsterdam, The Netherlands
i'm slowly writing a theme creation guide. the approach that I take in it is to create a VS project and only use Blend as a "sketch pad".
basically, trying to do things in Blend is a royal PITA.

the advantage of setting up a project in VS is that you can also debug your theme (ie check why bindings are not working etc) and you can use intellisense for MeediOS WPF objects.

if you're editing a screen file, you only have to restart the module and you can leave MeediOS running while editing.
if you're editing the resourcedictionary for a theme, you must restart MeediOS for every start or use the WPF debug window which has a button for that very purpose. (the latter doesn't work for me though, but that's off topic here).

I would not start with something from evolution but use a screen from the default theme (or a screen that is included by a standard plugin).
You should not rely on Evolution resources or images to make a plugin screen.


Offline
 Profile  
 
 Post subject:
PostMessage posted...: May 17th, 2010, 2:04 pm 
User avatar
More than 500 posts
More than 500 posts
Developer

Joined: September 6th, 2006, 2:28 am
Posts: 506
Location: MA, USA
maarten77 wrote:
i'm slowly writing a theme creation guide. the approach that I take in it is to create a VS project and only use Blend as a "sketch pad".
basically, trying to do things in Blend is a royal PITA.

I opened Blend briefly after downloading the trial. Looks to me as if it would take weeks just to figure out the UI :shock: It's crazy complicated. I don't have the patience to learn it yet.

maarten77 wrote:
the advantage of setting up a project in VS is that you can also debug your theme (ie check why bindings are not working etc) and you can use intellisense for MeediOS WPF objects.


How does one debug the theme? I'd guess it wouild be to run MeediOS with the debug UI plugin enabled, but what about during design time?
I played around with the WPFDefaultTheme project in VS. The designer won't load however for any screens, even the most simple ones. There are no syntax errors in the xaml after my changes, but a null reference exception on any of the {WPFUI:Convert xxxx} lines. :(

maarten77 wrote:
if you're editing a screen file, you only have to restart the module and you can leave MeediOS running while editing.
if you're editing the resourcedictionary for a theme, you must restart MeediOS for every start or use the WPF debug window which has a button for that very purpose. (the latter doesn't work for me though, but that's off topic here).

Guess I have a lot to learn still.

maarten77 wrote:
I would not start with something from evolution but use a screen from the default theme (or a screen that is included by a standard plugin).
You should not rely on Evolution resources or images to make a plugin screen.


If I edit/start-with a standard theme, how will it look in Evolution?
I'm really looking foward to learning how to do this stuff. I have a bunch of ideas for screens, but am crippled by lack of understanding so far.


Offline
 Profile  
 
 Post subject:
PostMessage posted...: May 17th, 2010, 3:12 pm 
User avatar
More than 500 posts
More than 500 posts

Joined: July 21st, 2006, 12:25 pm
Posts: 836
Location: Amsterdam, The Netherlands
if you want to start learning, start with some basic WPF lessons online.

also you should read this: http://www.meedios.com/wiki/index.php?t ... ating_XAML

debugging a theme using VS means that you use the VS output window which shows all kinds of information about what's happening in the WPFUI. don't worry about that yet, you probably won't need to use that for now.

If I were you, I'd would create my own VS project. Tonight, I'll post a how-to for you. If you want to, we can go from there step by step and I can show you how to write the screen file in the way that you want.

A screen file that shows well in Default theme should also display properly in Evolution (and can also be used in all other themes). If not, you should ask CRN about it, and he can explain whether it is somthing that should be fixes in Evolution or if it is something that is just done differently in Evolutiion.
By using this approach, your work can be used by all users in all themes.

On the other hand, if you just want to extend Evolution by just writing an Evolution-based screen, that's fine also.


Offline
 Profile  
 
 Post subject:
PostMessage posted...: May 17th, 2010, 4:33 pm 
User avatar
More than 500 posts
More than 500 posts
Developer

Joined: September 6th, 2006, 2:28 am
Posts: 506
Location: MA, USA
Thanks maarten77, that wiki section looks promising :)

I actually know quite a lot about debugging in visual studio (I've been a GUI developer/software engineer for about 20 years :D ), it's just the WPF/xaml that I'm new to. Since I'm new to WPF, the way it connects to WPFUI (and Binding in general) is still somewhat of a mystery. I'm really comfortable with VS, .NET (C# in particular, Windows Forms), SQL, and xml, so I probably don't need too much help on those parts.

What I think I do need help with is how to work with the screen files, WPF, and xaml. I don't know how it all connects together yet; how to debug screens, how to bind them to the underlying MeediOS code. I am stuck with the null reference exception when the WPF designer tries to load my screen, and don't have any idea of how to track it down! very frustrating since I can whip up a complicated windows forms application in a few minutes LOL :oops:

My main goal for the short term is to create a screen for Movie Showtimes that will look good/work well with the Evolution theme (and other themes too). I've updated the plugin to work with MeediOS, but have no way to show the results ;)

When you say I should start with a new project, what kind are you thinking is the best way for screen development and WPF learning?


Offline
 Profile  
 
 Post subject:
PostMessage posted...: May 17th, 2010, 4:45 pm 
User avatar
More than 500 posts
More than 500 posts

Joined: July 21st, 2006, 12:25 pm
Posts: 836
Location: Amsterdam, The Netherlands
with new project I meant a new VS project, just to help you write a screen file.

but if you've created a new plugin, then you should be able to use youtr existing project file and use the WIKI example and go from there.


Last edited by maarten77 on May 17th, 2010, 4:48 pm, edited 1 time in total.

Offline
 Profile  
 
 Post subject:
PostMessage posted...: May 17th, 2010, 4:47 pm 
User avatar
More than 500 posts
More than 500 posts

Joined: July 21st, 2006, 12:25 pm
Posts: 836
Location: Amsterdam, The Netherlands
can you send me the project file that you have now?


Offline
 Profile  
 
 Post subject:
PostMessage posted...: May 17th, 2010, 11:22 pm 
User avatar
More than 500 posts
More than 500 posts
Developer

Joined: September 6th, 2006, 2:28 am
Posts: 506
Location: MA, USA
Sorry for late reply; I have been away all day until now :)

The project that I'm using is basically the WPFDefaultTheme project in svn but with the references updated and some screen files and supporting stuff from Evolution copied over.
It's part of the MeediOS-2008-Express solution in svn. I just copied the MediaTrailers_Details.WPFUI.xaml screen file from Evolution and renamed to MediaMovieTimes_Details.WPFUI.xaml, and set up what I think are the correct supporting files. I've not changed the xaml at all yet.

Or do you mean the MovieTimes plugin project? Should I add these theme files to that?
I can send you either one. Neither are done :D


Offline
 Profile  
 
 Post subject:
PostMessage posted...: May 18th, 2010, 10:23 am 
User avatar
More than 500 posts
More than 500 posts

Joined: July 21st, 2006, 12:25 pm
Posts: 836
Location: Amsterdam, The Netherlands
you should just add your theme file to your plugin project. don't use a separate project.

- add the theme file to the project, set Compile to: "none"
- add references to your project file as per the wiki example (set Copy Local to false when applicable). these references are only to enable intellisense in xaml, they will not compile with your plugin dll.

(I have my project output path set to the actual MeediOS plugin folder, which is easy for debugging the plugin. So I set Copy Local for the xaml file to true)

rather than starting out with an existing screen theme, you might want to start with the simple screen template you find in the wiki.

look at the wiki for examples on how to show text, images, etc in the screen file.
the basic process is:
- add a control to wpf (for example: <WPFUI:WPFLabel name="mylabel">
- In your plugin, use RegisterControl to get a reference to an IMeedioLabel object in the abstractUI. MeediOS will take care of communication between the abstractUI and WPFUI
- You can simply use the object returned by RegisterControl;
ie mylabel.Text = "Hello world";

you can also use standard WPF objects. this is where databinding comes into play. if you're not familiar with WPF databinding, read up on it.
in code: myscreen.Data["mycaption"] = "Hello world";
in xaml: <Textblock Text="{Binding Path=Data[mycaption]}" />
(screen.data is used in MeediOS as a container for all kinds of data you want to relay to the UI)

menus and menu items are another story. I need to update the wiki about how to use menus.

screen layout is just standard WPF stuff.


Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 2 [ 24 posts ]  Go to page 1, 2  Next


Who is online

Users browsing this forum: Bing (USA) and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

cron