Skip to content

Conversation

@himgoyalmicro
Copy link
Owner

No description provided.

@dipeshmsft
Copy link
Collaborator

Few points before further review :

  1. Converters should be in there own file
  2. Converters are missing CanConvertTo and ConvertTo methods.

@dipeshmsft
Copy link
Collaborator

Is there a possibility to combine the TypeConverters in one ?

case KnownElements.DateTimeConverter: t = typeof(DateTimeConverter); break;
case KnownElements.DateTimeConverter2: t = typeof(DateTimeConverter2); break;
case KnownElements.UriTypeConverter: t = typeof(UriTypeConverter); break;
case KnownElements.RowDefinitionCollectionConverter: t = _asmFramework.GetType("System.Windows.Controls.RowDefinitionCollectionConverter"); break;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why have you used this method ? typeof should have worked.

{
if (value is string input)
{
IProvideValueTarget ipvt = context?.GetService(typeof(IProvideValueTarget)) as IProvideValueTarget;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what should we do when string is empty or null ?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added please check

}
}

return base.ConvertFrom(context, culture, value);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to call this base.ConvertFrom method ? We know that base cannot handle the conversion anyway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants