-
Notifications
You must be signed in to change notification settings - Fork 5
MarkAsNotMapped Xaml Mapping Action
Comments out the specified Xaml element or property. This action also generates a messages that will be added to the migration report indicating that manual changes may be required after the migration.
The element or property which is the target of this mapping action will be commented out.
Property | Usage | Description |
---|---|---|
ElementName | Optional | The new of the original element used to generate the error report. This is required when the container element is renamed. |
Say that we want to mark the SupportedOrientations
property as not supported. The following mapping uses the MarkAsNotMapped
mapping action to do this task.
<MapUnit xmlns='clr-namespace:Mobilize.Mappers.Extensibility.Core;assembly=Mobilize.ExtensibleMappers'
xmlns:xmap='clr-namespace:Mobilize.XamlMappers;assembly=Mobilize.XamlMapper'
xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml' >
<MapUnit.Elements>
<xmap:XamlElementMapper ElementName="PhoneApplicationPage"
ElementNamespace="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone">
<xmap:XamlElementMapper.Maps>
<xmap:XamlMap Kind="Element">
<xmap:XamlMap.Action>
<xmap:RenameElement NewName="Page"
NewNamespace="http://schemas.microsoft.com/winfx/2006/xaml/presentation" />
</xmap:XamlMap.Action>
</xmap:XamlMap>
<xmap:XamlMap Kind="Property" PropertyName="SupportedOrientations" >
<xmap:XamlMap.Action>
<xmap:MarkAsNotMapped ElementName="PhoneApplicationPage" />
</xmap:XamlMap.Action>
</xmap:XamlMap>
</xmap:XamlElementMapper.Maps>
</xmap:XamlElementMapper>
</MapUnit.Elements>
</MapUnit>
-
It is important to specify the
ElementName
attribute to generate a correct error report. If the container is being renamed and this attribute is not used, the name of the target element is generated as part of the error message. -
This mapping action can be used with properties and elements.
Contact us for more information
Overview
Writing mappings
Code Mapping Actions
- ActionSequence
- AddHelper
- AddNamespaceImport
- AddPreStatementFromTemplate
- CommentOut
- Conditional
- Keep Code Mapping Action
- MarkAsNotMapped
- RedirectCall
- RedirectCallToInnerMember
- RedirectIndexer
- RedirectProperty
- RemoveCurrentStatement
- RemoveParameter
- ReplaceClassUsage
- ReplaceMethodBodyWithTemplate
- ReplaceParameterDeclarationType
- ReplaceParameterMember
- ReplaceParameterValue
- ReplaceWithMethodCall
- ReplaceWithProperty
- ReplaceWithTemplate
Code Mapping Conditions
- AllConditionsApply
- ArgumentCount
- AssignName
- AssignNameToArgumentRange
- IsExpressionOfType
- IsStringLiteralMatchingRegex
- WithArgument
- WithAssignment
- WithAssignmentLeftSide
- WithAssignmentRightSide
- WithCalledMemberOwner
- WithCalledMethodExpression
- WithConstructorCall
- WithLambdaExpressionBody
- WithLambdaExpressionParameter
- WithLeftSideOfDottedAccess
- WithMemberInitValue
- WithMethodCall
XAML mapping actions
- ActionSequence
- AddStatementToConstructorFromTemplate
- BindPropertyValueElement Xaml mapping action
- ChangeEventHandlerEventArgsType
- CommentOutElement
- CommentOutProperty
- MarkAsNotMapped
- MoveValueToContentProperty
- RemoveNamespaceDeclaration
- RenameElement
- RenameProperty
- ReplaceAttributeValue
- ReplaceEventHandlerBodyWithTemplate
- ReplaceEventHandlerParameterMember
- ReplaceNamespaceDeclaration
- ReplacePropertyValueWithParentResource
- ReplaceStaticResourceWithThemeResource
- SetPropertyValueToComplexElement
- SetPropertyValueToSimpleValue
- WrapContent
XAML mapping conditions
Misc