windows form controls are not visible in wpf

Saturday, July 12, 2014

in my application i need to include windows form controls but the controls are not visible in wpf Window ....How to make them visible


Xaml:



<WindowsFormsHost Height="100" HorizontalAlignment="Left" Margin="266,274,0,0" Name="windowsFormsHost1" VerticalAlignment="Top" Width="200" >
<wf:Button BackColor="Blue" Margin="266,274,0,0" Width="100" Height="100" Text="Click Me" Click="Button_Clik"></wf:Button>
</WindowsFormsHost>


C#:



private void Button_Clik(object sender, EventArgs e)
{
System.Windows.Forms.MessageBox.Show("Hi");
}






http://ift.tt/1s6HXYA