Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Because for me it's not really clear what you want to do, here another try:</p> <p>If <code>MyLibAssembly</code> is the main namespace of your application and there in you have a Window named <code>MainWindow</code> and a class named <code>Class1</code> that you want to instantiate in your <code>MainWindow</code>-class:</p> <ul> <li>Make sure, that in Class1 is no error, the project must compile without errors. Remove first the namespace-declaration from the xaml and compile your project till you have no compilation errors.</li> <li>Make sure that Class1 is public and has a paramterless constructor</li> <li>Make sure that in the code behind your MainWindow is also in the <code>MyLibAssembly</code>-namcespace.</li> <li>Add then the namspace-declaration <code>xmlns:local="clr-namespace:LibNameSpace</code> into your xaml. <code>local</code> is generally used to declare the same namespace as your current element, in your case the window, is in.</li> <li>Insert your <code>Class1</code> with the <code>&lt;local:Class1/&gt;</code> -tag in the xaml. If Class1 does not derive from FrameworkElement or a higher level control, you must add it into the resources-section of your window. If this is true, give it a key. <code>&lt;local:Class1 x:Key="KeyToYourClass"/&gt;</code></li> </ul> <p>Maybe vs is out of sync. Click in the solution-explorer on the root-node <strong>Clean Solution</strong> and then <strong>Rebuild Solution</strong>. Maybe that helps.</p> <p>I hope this helped. If not, try to reformat your question (use the code-symbol to make the question more readable and try to rephrase to make more clear what your desire is).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload