Hello Friends :)
I'm New to c# and wpf,and i'm stuck in this , i googled but i cant find a answer .
please Help :)
my Qusetion,
I want to call a Method in GetLoc that takes 1 argument (Object of ComboLoad Class) from my xaml.
Combo Load Class
namespace BE
{
public class ComboLoad
{
public int MyProperty { get; set; }
}
}
GetLoc Class
namespace DS
{
public class GetLoc
{
public GetLoc(ComboLoad obj)
{
}
public void getCombodata(ComboLoad cmb)
{
new CmbLoad().getLocToCombo(cmb);
}
}
}
And My XAML
/*<window.resources>
<ObjectDataProvider x:Key="cmbObjectBE" ObjectType="{x:Type BE:ComboLoad}" />
<ObjectDataProvider ObjectType="{x:Type DS:GetLoc}"
MethodName="getCombodata" x:Key="cmbObjectDS">
<ObjectDataProvider.MethodParameters>
<be:comboload xmlns:be="#unknown">cmbObjectBE
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
<grid datacontext="{Binding Source={StaticResource cmbObjectDS}}">*/
It says their is a error in this line
"<be:comboload xmlns:be="#unknown">cmbObjectBE"
Error -> The Type ComboLoad Does Not Support direct Content
Sorry For the Poor English
And Thank You ! :)