Click here to Skip to main content
15,910,471 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Adding the WPF Ribbon Bar as a resource for my other apps Pin
Pete O'Hanlon18-Aug-09 9:24
mvePete O'Hanlon18-Aug-09 9:24 
I'm a bit confused as to what you're actually asking. Are you asking whether you can host none-WPF windows inside the application so that they appear to be running inside a ribbon enabled WPF application? If you are, then yes you can - as long as you add the WindowsFormsIntegration and System.Windows.Forms assemblies as in the following:
<Window x:Class="WpfForm.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:wfi="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
    xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
    xmlns:myForm="clr-namespace:MyFormsNamespace;assembly=MyFormsApp"
    Title="Host in WPF" Height="400" Width="300"
    >

  <Grid>
    <wfi:WindowsFormsHost>
      <myForm:MyWindowForm />
    </wfi:WindowsFormsHost>
  </Grid>
</Window>
In this sample, you can see that I've added the windows form inside the WindowsFormsHost.

"WPF has many lovers. It's a veritable porn star!" - Josh Smith

As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.


My blog | My articles | MoXAML PowerToys | Onyx



GeneralRe: Adding the WPF Ribbon Bar as a resource for my other apps Pin
trey white18-Aug-09 10:26
trey white18-Aug-09 10:26 
GeneralRe: Adding the WPF Ribbon Bar as a resource for my other apps Pin
Pete O'Hanlon18-Aug-09 10:46
mvePete O'Hanlon18-Aug-09 10:46 
GeneralRe: Adding the WPF Ribbon Bar as a resource for my other apps Pin
trey white18-Aug-09 11:00
trey white18-Aug-09 11:00 
GeneralRe: Adding the WPF Ribbon Bar as a resource for my other apps Pin
Pete O'Hanlon18-Aug-09 11:11
mvePete O'Hanlon18-Aug-09 11:11 
QuestionWebClient usage from Silverlight not working fo me (Security?) Pin
pisanis18-Aug-09 5:06
pisanis18-Aug-09 5:06 
AnswerRe: WebClient usage from Silverlight not working fo me (Security?) Pin
Mark Salsbery18-Aug-09 12:54
Mark Salsbery18-Aug-09 12:54 
GeneralRe: WebClient usage from Silverlight not working fo me (Security?) Pin
pisanis19-Aug-09 4:42
pisanis19-Aug-09 4:42 
QuestionProgramatically Adding Wpf Custom controls into vs2008 toolbox in windows application. Pin
sivat51818-Aug-09 0:13
sivat51818-Aug-09 0:13 
AnswerRe: Programatically Adding Wpf Custom controls into vs2008 toolbox in windows application. Pin
User 27100921-Aug-09 3:04
User 27100921-Aug-09 3:04 
GeneralRe: Programatically Adding Wpf Custom controls into vs2008 toolbox in windows application. Pin
sivat51826-Aug-09 21:47
sivat51826-Aug-09 21:47 
QuestionBinding images to an ImageButton at runtime Pin
Wolfram Steinke17-Aug-09 16:47
Wolfram Steinke17-Aug-09 16:47 
AnswerRe: Binding images to an ImageButton at runtime Pin
Pete O'Hanlon17-Aug-09 22:41
mvePete O'Hanlon17-Aug-09 22:41 
GeneralRe: Binding images to an ImageButton at runtime Pin
Wolfram Steinke18-Aug-09 14:15
Wolfram Steinke18-Aug-09 14:15 
GeneralRe: Binding images to an ImageButton at runtime Pin
Christian Graus18-Aug-09 15:24
protectorChristian Graus18-Aug-09 15:24 
GeneralRe: Binding images to an ImageButton at runtime Pin
Pete O'Hanlon18-Aug-09 21:42
mvePete O'Hanlon18-Aug-09 21:42 
GeneralRe: Binding images to an ImageButton at runtime Pin
Wolfram Steinke19-Aug-09 1:43
Wolfram Steinke19-Aug-09 1:43 
GeneralRe: Binding images to an ImageButton at runtime Pin
Pete O'Hanlon19-Aug-09 2:22
mvePete O'Hanlon19-Aug-09 2:22 
GeneralPaint.Net for WPF Pin
sufiyan_ansari117-Aug-09 6:27
sufiyan_ansari117-Aug-09 6:27 
GeneralRe: Paint.Net for WPF Pin
Christian Graus17-Aug-09 16:54
protectorChristian Graus17-Aug-09 16:54 
QuestionWPF user interface stored in DB Pin
kstxx17-Aug-09 0:49
kstxx17-Aug-09 0:49 
AnswerRe: WPF user interface stored in DB Pin
Pete O'Hanlon17-Aug-09 1:13
mvePete O'Hanlon17-Aug-09 1:13 
GeneralRe: WPF user interface stored in DB Pin
kstxx17-Aug-09 1:19
kstxx17-Aug-09 1:19 
GeneralRe: WPF user interface stored in DB Pin
Pete O'Hanlon17-Aug-09 1:36
mvePete O'Hanlon17-Aug-09 1:36 
QuestionCalling IContextMenu with a WPF ContextMenu - need HMENU Pin
seguso16-Aug-09 22:38
seguso16-Aug-09 22:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.