-
Notifications
You must be signed in to change notification settings - Fork 5
ReplaceStaticResourceWithThemeResource Xaml Mapping Action
ldfallas edited this page Aug 17, 2015
·
2 revisions
Replaces a StaticResource
usage with a ThemeResource
usage on a property value.
This mapping action verifies that the current value of the property is a reference of the specified StaticResource.
Static resources are commonly used to refer to predefined theme resources. For example:
<Border Fill="{StaticResource PhoneAccentBrush}">...</Border>
In this case if we want to change from PhoneAccentBrush
to SystemColorControlAccentBrush
we can write:
<xmap:ReplaceStaticResourceWithThemeResource
NewThemeResourceName="SystemColorControlAccentBrush"
OldStaticResourceName="PhoneAccentBrush" />
Property | Usage | Description |
---|---|---|
OldStaticResourceName | Required | The name of the static resource currently used by the current property value. If the current property value doesn't use this static resource, this mapping action will not change the target. |
NewThemeResourceName | Required | The name of the ThemeResource to generate |
TODO
TODO
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