-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
type convertor xaml shortening #1
base: main
Are you sure you want to change the base?
Conversation
…ithub.com/himgoyalmicro/wpf into user/himgoyal/TypeConvertorXamlShortening
Few points before further review :
|
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Grid.cs
Show resolved
Hide resolved
Is there a possibility to combine the TypeConverters in one ? |
…initionCollectionConverter
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Grid.cs
Outdated
Show resolved
Hide resolved
@@ -5537,6 +5541,8 @@ private Type InitializeOneType(KnownElements knownElement) | |||
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; |
There was a problem hiding this comment.
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.
...Wpf/src/PresentationFramework/System/Windows/Controls/ColumnDefinitionCollectionConverter.cs
Show resolved
Hide resolved
...Wpf/src/PresentationFramework/System/Windows/Controls/ColumnDefinitionCollectionConverter.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/Grid.cs
Outdated
Show resolved
Hide resolved
...et.Wpf/src/PresentationFramework/System/Windows/Controls/RowDefinitionCollectionConverter.cs
Show resolved
Hide resolved
{ | ||
if (value is string input) | ||
{ | ||
IProvideValueTarget ipvt = context?.GetService(typeof(IProvideValueTarget)) as IProvideValueTarget; |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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
No description provided.