Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. WPF, Expression Blend and C++

WPF, Expression Blend and C++

Scheduled Pinned Locked Moved WPF
csharpc++wpfhostingquestion
3 Posts 2 Posters 7 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TragicComic
    wrote on last edited by
    #1

    I just went to the Microsoft "Heroes Happen Here" launch event and I'm really excited about WPF. However, all of my work is currently in C++ and at least for the next year or so will likely stay there. I've been looking at some of the tutorials about hosting WPF content in a Win32 app, and this seems like kind of a no brainer, but the tutorials never get past the "here's how you do it procedurally". I would very much like to be able to author forms and dialogs in Expression Blend and then load them from my C++ Win32 app. Does anyone have any good tutorials, or have straight forward code snip-its for doing this? Is this even a reasonable thing to try to do? Thanks in advance... Adam

    J 2 Replies Last reply
    0
    • T TragicComic

      I just went to the Microsoft "Heroes Happen Here" launch event and I'm really excited about WPF. However, all of my work is currently in C++ and at least for the next year or so will likely stay there. I've been looking at some of the tutorials about hosting WPF content in a Win32 app, and this seems like kind of a no brainer, but the tutorials never get past the "here's how you do it procedurally". I would very much like to be able to author forms and dialogs in Expression Blend and then load them from my C++ Win32 app. Does anyone have any good tutorials, or have straight forward code snip-its for doing this? Is this even a reasonable thing to try to do? Thanks in advance... Adam

      J Offline
      J Offline
      Jammer 0
      wrote on last edited by
      #2

      Have a look into ElementHost ... It allows you to host WPF controls in WindowsForms. Not done it myself but there is a chapter in the Adam Nathan WPF Unleashed book that talks about it. http://blog.voidnish.com/?p=119[^] http://msdn2.microsoft.com/en-us/library/system.windows.forms.integration.elementhost.aspx[^]

      Jammer Going where everyone here has gone before! :) My Blog

      1 Reply Last reply
      0
      • T TragicComic

        I just went to the Microsoft "Heroes Happen Here" launch event and I'm really excited about WPF. However, all of my work is currently in C++ and at least for the next year or so will likely stay there. I've been looking at some of the tutorials about hosting WPF content in a Win32 app, and this seems like kind of a no brainer, but the tutorials never get past the "here's how you do it procedurally". I would very much like to be able to author forms and dialogs in Expression Blend and then load them from my C++ Win32 app. Does anyone have any good tutorials, or have straight forward code snip-its for doing this? Is this even a reasonable thing to try to do? Thanks in advance... Adam

        J Offline
        J Offline
        Jammer 0
        wrote on last edited by
        #3

        Basically your going to have to make do with intermediate C# / VB / Blend projects. The example looks like it has to be a loose XAML file as well (no class definition using an x:Class="" declaration. In Blend you end up with a partial class code-behind which I'm almost sure would blow up in your scenario.

        <UserControl
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Main="clr-namespace:WPFWindows"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2006"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d"
        x:Class="WPFWindows.Navigator3"
        Width="Auto" Height="Auto">

        Jammer Going where everyone here has gone before! :) My Blog

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups