Skip to content

AnyConditionApplies Xaml Mapping Condition

ldfallas edited this page Aug 17, 2015 · 2 revisions

Description

Verifies if at least one subcondition succeeds.

It is equivalent to a logical OR on XAML mapping conditions

Properties

​Property ​Usage ​Description
​SubConditions ​Content property Subconditions

Example

This condition could be used to remove an attribute given several conditions. For example

...
  <xmap:RemoveAttribute>
    <xmap:RemoveAttribute.Condition>
      <xmap:AnyConditionApplies>
        <xmap:PropertyUsesStaticResource PropertyName="FontSize" StaticResourceName="PhoneFontSizeNormal" />
        <xmap:PropertyUsesStaticResource PropertyName="FontSize" StaticResourceName="PhoneFontSizeSmall" />
      </xmap:AnyConditionApplies>
    </xmap:RemoveAttribute.Condition>
  </xmap:RemoveAttribute>
...

Notes

  • If no sub elements are specified this condition succeeds
  • This succeeds when the first sub condition succeeds (it short cicuits)

Overview

Writing mappings

Code Mapping Actions

Code Mapping Conditions

XAML mapping actions

XAML mapping conditions

Misc

Clone this wiki locally