wpf - windowsformhost cant load a usercontrol from another dll -


so have dll project contains many useful classes , controls me (lets call foo.dll). i'm making wpf app. need use of them in app. created usercontrol windows forms , referenced usercontrolforme foo.dll. it's shown, good. want insert usercontrol wpf form. looks this:

<usercontrol x:class="flatrectangular_profile.usercontrol1"              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"               xmlns:d="http://schemas.microsoft.com/expression/blend/2008"              mc:ignorable="d"            xmlns:uc="clr-namespace:flatrectangular_profile.uc"           height="2093" width="717">     <grid name="grid">         <windowsformshost>             <uc:windowsformsprofmanual ></uc:windowsformsprofmanual>         </windowsformshost>     </grid> </usercontrol> 

but here error "cant load type usercontrolforme foo.dll". no info on error. again, usercontrolforme loads in windowsformsprofmanual. these going on in 1 class library. referenced foo.dll needed.

no idea how next. tried load in code in usercontrol.loaded event, fails too, , shows stacktrace leads constructor of usercontrolforme.

i guess you'll have add assembly namespace import point application in right direction:

xmlns:uc="clr-namespace:flatrectangular_profile.uc;assembly=mydll" 

Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -