Click here to Skip to main content
15,891,033 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Adding a ScrollBar property to ListBox properties Pin
chaiguy133713-Sep-08 8:01
chaiguy133713-Sep-08 8:01 
QuestionCreating readonly objects in a WPF RichTextBox Pin
Spacedmc11-Sep-08 7:33
Spacedmc11-Sep-08 7:33 
AnswerRe: Creating readonly objects in a WPF RichTextBox Pin
Pete O'Hanlon11-Sep-08 8:48
mvePete O'Hanlon11-Sep-08 8:48 
GeneralRe: Creating readonly objects in a WPF RichTextBox Pin
Spacedmc11-Sep-08 9:56
Spacedmc11-Sep-08 9:56 
GeneralRe: Creating readonly objects in a WPF RichTextBox Pin
Spacedmc11-Sep-08 12:09
Spacedmc11-Sep-08 12:09 
GeneralRe: Creating readonly objects in a WPF RichTextBox Pin
Pete O'Hanlon11-Sep-08 12:26
mvePete O'Hanlon11-Sep-08 12:26 
GeneralRe: Creating readonly objects in a WPF RichTextBox Pin
chaiguy133713-Sep-08 7:50
chaiguy133713-Sep-08 7:50 
QuestionCan not Convert System.Windows.Controls to System.Windows.Forms.Controls [modified] Pin
bruze11-Sep-08 3:29
bruze11-Sep-08 3:29 
Can any one Help


I have created one Panel Control(System.Windows.Forms) using wpf window application and create one user control using Windows Control Library.

I want to add the usercontrol in Panel

I have tried the following code

<window x:class="Sivam.Window1" xmlns:x="#unknown"><br />
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"<br />
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"<br />
    xmlns:wfi="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"<br />
    xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"<br />
    Title="Sivam" Height="300" Width="300" Loaded="Form_Load"><br />
<br />
 grid><br />
 windowsformshost margin="7.37,6.72333333333333,48,22"><br />
 wf:panel height="50" x:name="panel1" text="Prompt" xmlns:wf="#unknown" /><br />
 /windowsformshost><br />
 /grid><br />
<br />
/window>;<br />
</window>



private void Form_Load(object Sender, EventArgs e)<br />
        {<br />
            UserControl1 uc1 = new UserControl1();<br />
            panel1.Controls.Add(uc1);<br />
            <br />
            //System.Windows.Forms.Integration.ElementHost host = new System.Windows.Forms.Integration.ElementHost();<br />
            //UserControl1 uc1 = new UserControl1();<br />
            //host.Controls.Add(uc1); <br />
            //panel1.Controls.Add(host);<br />
                      <br />
        }



But I got the Error

Convert System.Windows.Controls to System.Windows.Forms.Controls

Thanks,
Siva

modified on Thursday, September 11, 2008 9:52 AM

AnswerRe: Can not Convert System.Windows.Controls to System.Windows.Forms.Controls Pin
chaiguy133713-Sep-08 7:56
chaiguy133713-Sep-08 7:56 
QuestionWPF Control Like Asp.net's Datalist Pin
divyesh14329-Sep-08 20:39
divyesh14329-Sep-08 20:39 
QuestionIs it possible to have a transparent "hole" in a layer of WPF? Pin
chaiguy13378-Sep-08 14:52
chaiguy13378-Sep-08 14:52 
AnswerRe: Is it possible to have a transparent "hole" in a layer of WPF? [modified] Pin
Pete O'Hanlon9-Sep-08 10:51
mvePete O'Hanlon9-Sep-08 10:51 
GeneralRe: Is it possible to have a transparent "hole" in a layer of WPF? Pin
chaiguy13379-Sep-08 11:09
chaiguy13379-Sep-08 11:09 
GeneralRe: Is it possible to have a transparent "hole" in a layer of WPF? Pin
Pete O'Hanlon9-Sep-08 11:12
mvePete O'Hanlon9-Sep-08 11:12 
GeneralRe: Is it possible to have a transparent "hole" in a layer of WPF? Pin
chaiguy13379-Sep-08 11:22
chaiguy13379-Sep-08 11:22 
QuestionComposite Application Guidance Pin
Jammer8-Sep-08 0:52
Jammer8-Sep-08 0:52 
AnswerRe: Composite Application Guidance Pin
Pete O'Hanlon8-Sep-08 1:07
mvePete O'Hanlon8-Sep-08 1:07 
GeneralRe: Composite Application Guidance Pin
Jammer8-Sep-08 1:12
Jammer8-Sep-08 1:12 
QuestionHow to make a WPF control appear on top of all other controls? Pin
Pravinc19848-Sep-08 0:43
Pravinc19848-Sep-08 0:43 
AnswerRe: How to make a WPF control appear on top of all other controls? Pin
Insincere Dave8-Sep-08 6:30
Insincere Dave8-Sep-08 6:30 
GeneralRe: How to make a WPF control appear on top of all other controls? Pin
Pravinc19848-Sep-08 18:55
Pravinc19848-Sep-08 18:55 
GeneralRe: How to make a WPF control appear on top of all other controls? Pin
chaiguy13379-Sep-08 11:17
chaiguy13379-Sep-08 11:17 
GeneralRe: How to make a WPF control appear on top of all other controls? Pin
chaiguy13379-Sep-08 11:19
chaiguy13379-Sep-08 11:19 
GeneralRe: How to make a WPF control appear on top of all other controls? Pin
Tinkering Turtle23-Sep-09 10:10
Tinkering Turtle23-Sep-09 10:10 
QuestionHow to change Image Source on MouseDown event in WPF? Pin
divyesh14327-Sep-08 19:00
divyesh14327-Sep-08 19:00 

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.