Custom control with String dependency property
void SetLabel(const NsString& label);
void AttributeControlBase::SetLabel(const NsString& label)
{
Noesis::ContentControl::SetValue<NsString>(LabelProperty, label);
}
throws an error, is that the right signature?
void AttributeControlBase::SetLabel(const NsString& label)
{
Noesis::ContentControl::SetValue<NsString>(LabelProperty, label);
}
throws an error, is that the right signature?
-
sfernandez
Site Admin
- Posts: 3154
- Joined:
Re: Custom control with String dependency property
Try this:
Code: Select all
const char* AttributeControlBase::GetLabel() const
{
return GetValue<NsString>(LabelProperty).c_str();
}
void AttributeControlBase::SetLabel(const char* label)
{
SetValue<NsString>(LabelProperty, label);
}
Re: Custom control with String dependency property
Wouldn't it have to be wchar to support localization?
Re: Custom control with String dependency property
We use UTF8 encoding for everything. So char* is always correct. Please, have a look at our localization sample.
Who is online
Users browsing this forum: No registered users and 2 guests