omniplex

WPF and new Windows.

by omniplex on Jul.14, 2010, under Personal, Random

So I’m learning to program a GUI with WPF and most of the examples that I have seen don’t include alot of real navigation unless you are using a Page and treating it more like a browser page.  However I have been trying to use “Windows” with “Grid” containers to do Navigation similar to how Windows Media Center does it’s navigation.  Since I’m still learning WPF  I don’t know all the ins and outs yet. However, I did find this little tidbit.

If I have a main Window with a grid container I can clear the contents of the container and load it with the contents of another xaml file as a child.  However, what I found was that I could not reload the original window contents without very well. One of the primary reasons is that I need to detach the new window and then close it. I can detach the window by assigning the Content to null. Then I would call the .Close() method to close it out. If I do not do this, when I terminate the application it leaves the GUI thread hanging and doesn’t actually close out the process.

Here is the sample code:

AdminWindow myAdmin = new AdminWindow();
 object content = myAdmin.Content;
 myAdmin.Content = null;
 myAdmin.Close();
 _Grid.Children.Clear();
 _Grid.Children.Add(content as UIElement);

Hopefully that makes sense to everyone. I’m still working on my writing and trying to get information out.

Leave a Comment more...

MediaCenter Project

by omniplex on May.17, 2010, under Random

A friend and I have been working slowly on our MediaCenter project. So far the features that are being worked on is mostly the back end stuff.  Interaction with IMDB, database connectivity with MySQL ( other databases will be supported ), and finally interaction and control of uTorrent for torrent downloads.

I know that this isn’t a lot of stuff, but we are working on it slowly and it’s starting to get there.  Hopefully around the end of this month i can start working on the UI part.  For this part we plan on incorporating and using Video Lan Client as the media player.  By using the Video Lan Client we will be able to not worry about making sure a lot of common codecs are installed as that will be handled by VLC instead of the Operating System.

Hopefully we will be further along by the end of this year.

Leave a Comment more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!