c# - Namespace error when adding viewmodel -


i come strange problem. @ first it's easy thing trust me it's make me crazy !

i want specify wich file want associate xaml page in datacontext, did on other xaml page don't understand why !

<usercontrol x:class="finalmediaplayer.onglet.musique.home.homemusique"          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"           xmlns:mui="http://firstfloorsoftware.com/modernui"          xmlns:viewmodel="clr-namespace:finalmediaplayer.onglet.musique.home"          xmlns:tools="clr-namespace:finalmediaplayer.tools"          mc:ignorable="d"           d:designheight="300" d:designwidth="300">  <usercontrol.datacontext>     <viewmodel:homeviewmodelmusique></viewmodel:homeviewmodelmusique>(error here) </usercontrol.datacontext> 

the name "homeviewmodelmusique" doesn't exist "clr-namespace:finalmediaplayer.onglet.musique.home".

namespace finalmediaplayer.onglet.musique.home { public class homeviewmodelmusique : notifypropertychanged { 

as can see put path in viewmodel apparently file don't exist in namespace ... advance guys, im gonna suicide soon...

are namespaces in same assembly? if not need specify assembly in namespace declaration.

e.g:

xmlns:viewmodel="clr-namespace:finalmediaplayer.onglet.musique.home;assembly=assemblyname" 

Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -