Learning WPF... Full screen launcher app - wpf

I'm in the process of building a Home Theatre PC (HTPC), and figured this could give me a small project to learn some more about WPF.
I want to build a simple program launcher. It would be an application that would fill the screen with a background of my choosing, and a few large icons/buttons to represent applications. I have an IR remote that will be set up to emulate keystrokes, so I can use the "keyboard" to move between the large buttons and "click" one of them, launching a program.
I'd like to define my button info, images, and background using some kind of external config file and image files in the same folder as the exe.
I've been playing around with the idea in VS2008 using VB but already I'm getting stuck with just trying to get an external image file to appear on a button. Many of the samples I find are relatively complicated and are written in C#, but I work in VB. If anyone has suggestions for getting over this hurdle or ideas on how I should approach other parts of my application, your input is welcome.
Thanks!

Try working your way through this series:
A First Introduction to WPF and XAML for Visual Basic Programmers

Good intro recommended in the first answer - if you want to go a bit deeper have a look at WPF - how and why

Related

How to display WPF overlay on top of DirectX?

I learned how to hook into the game EndScene function, but how to host WPF content is something I am trying a very long time to understand.
I am trying to do something like Overwolf, for a specific game (starcraft), I asked their team how they do it, but they didn't give any information.
So I tried to examine what exactly OverwolfLauncher.exe does, and I found it injects 3 dlls:
OWExplorer-2006.dll, OWLog.dll, OWClient.dll.
The first two seem not really important. The third hooks into the game directx or opengl dll, and their overlay manager does some "magic". And that's only what I was able to understand.
I would be happy if someone could explain me how exactly Overwolf managed to host WPF content as overlay.
There are many questions like this on stackoverflow.
This one was marked as solved, but the solution seems to be about hosting DirectX inside WPF.

Convert wpf application to wpf browser application

Is it possible to convert wpf desktop application to wpf browser application? I want to make my application run from browser.
According to my experience there is no converter available which converts WPF to XBAP.
But I did work with multiple platforms together several time in my project. I do maintain 3 platforms together WPF, Silverlight and XBAP in a single solution having single code base. I keep a common code-base and share files between 3 platforms. To achieve this I suggest you to create a Hello world XBAP application and run it first. You need to have few basic idea about how an XBAP application works. Initially understanding the entry and exit point of the application will be enough for you. Try adding one button in Page and understand how it works. Once it’s done then try to link the existing project files (XAML and CS) one by one into the XBAP project. Understand what you are adding and why are you adding. Yes it's quite a hard work you need to do. But don’t worry XBAP, WPF XAML & C# codes are almost similar. You need to know that Conditional compilation symbols can be set in project properties. So that you will be allowed to write #if XBAP & #endif statement in your code sometimes, because few classes or features may not be supported in XBAP and you need to write specific code for XBAP. As an example Dropshadow related features are not available in XBAP.
Hope this answers your query!

Image Application in WPF and Perfomance

I am planning to build Image processing application using WPF. Brightness /Contrast and Histogram are main operation of this application. I have downloaded the application " Foundations: Bitmaps and Pixel Bits" from
http://msdn.microsoft.com/en-us/magazine/cc534995.aspx
. But when I tried to open the images which are more than 1200x1600, It is very slow. How to increase the performance. Is any one worked on Image processing in WPF.
Please suggest me how to solve this perfomance issue in WPF for image(more than 1600x1200) operation.
Thanks you,
Harsha
After a week searching the net I got some useful information. People are using COM DLLs for all the Image related calucualtions and update the WPF application. Here is the link to MSDN:Custom BitmapEffect Sample - RGBFilter
http://msdn.microsoft.com/en-us/library/ms771475(VS.90).aspx
Buut Problem with this is, one have register the COM dll.
But I have also found the sample code where registration of COM Dll is not required.
http://johnmelville.spaces.live.com/cns!79D76793F7B6D5AD!115.entry
I have Opened the Image of size 3000x3500 and changed the RGB values. It is very smooth.
But I didn't understand how slider in the XMAL interact with this COM DLL and How to write this COM DLL.
If any one who understand the this code please explain. It will be very helpful for all.
Thanks and regards
Harsha

Easiest way to create interactive simulated desktop app in Silverlight?

I'm creating a training lab for a desktop application.
Basically it'll be a series of screenshots with hotspots, when the user clicks in the right spot it advances to the next screenshot. There will also be some simple text input, so a textbox will need be overlaid over some of the screenshots. The logic is simply if the user enters the right thing they get to move to the next screen.
Adobe Captivate or good old timeline-based Flash is great for creating stuff like this. But this project has to be Silverlight. I considered using Captivate along with a swf to silverlight converter, but I believe those converters only support animations not logic.
The question is: what is the easiest way to create this type of thing in Silverlight? Can Expression Blend do it? Other alternatives? Ideally little programming is required.
Blend is great for this, you may also want to try using Sketchflow to prototype it quickly http://www.microsoft.com/expression/products/SketchFlow_OverView.aspx
Using Expression Blend's behaviours and storyboards makes it easy to create an application with no code in no time.

Final steps in using MVVM to decouple GUI from business logic?

Just recently, I learned about using MVVM to decouple GUIs from the underlying model. I ended up learning as much as I could to convert my current application over to MVVM, and was largely successful. Now I need to figure out how to actually take a GUI generated in Blend and use it in place of my current GUI, which was designed in Visual Studio. I can't find any resources on the web for making this as seamless as possible. I'd like to know what you all have done and have had work for you.
My ultimate solution would be something that would allow me to, at runtime, select a skin from a menu and immediately have the GUI change from the current one to another that the user selects. Can anyone point me to posts that explain how to do this?
My current goal is less ambitious -- I'd like to be able to add my new Blend GUI into my Visual Studio project and when I compile, have the new Blend GUI appear. If I want to go back to the old GUI, I would have to recompile. For now, that is okay.
I've got my Blend project added to my VS2008 solution, and have set it to be the startup application. That works fine -- if I run the app, my new GUI appears instead of the old one. The problem now is that it needs DLLs that are actually in a different folder -- the bin\Debug folder of the original startup application. Am I supposed to leave my original GUI as the startup application, and then have its App codebehind load the other GUI?
Also, each of the respective GUIs needs a reference to the ViewModel. In my case, I was just instantiating it in my current GUI class. For the Blend GUI, I instantiated one there as well, since only one of the GUIs will be active. Is this where something like the Unity framework should be used?
Sorry about all of the possibly-incoherent questions, but I'm not quite sure how I should proceed from here. I feel like I'm so close to proving to myself that MVVM is the way to go from a GUI standpoint (I'm already sold on the testability bit).
All the examples I've seen dynamically switch GUI appearance by using some form of ResourceDictionary swapping. A few links:
Load XAML Resource Dictionaries at Runtime
WPF change theme/style at runtime
Hope that helps.
I found a mistake, where in one part of my code I was using the wrong property to get at the currently-running assembly's path. I am now using
System.Reflection.Assembly.GetExecutingAssembly().Location
Although this does work, it only works if I copy the exe from the Blend project's bin\Debug folder into my main application's bin\Debug folder. I will have to live with this by using a post-build event, I guess. I was so spoiled for the past several months working with .NET, where I didn't have to do this (like before in C++) because all of the referenced assemblies get automatically copied over. If I want to debug any code-behind, I also have to set the starting executable in the Blend project's settings, which is inconvenient as well, especially when working on different computers where the paths aren't set up the same. Any suggestions here would also be appreciated!

Resources