firstfloorsoftware/xcc

How to conditional compile an element with namespace already

Closed this issue · 1 comments

Consider the following:

<phone:PhoneApplicationPage
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  xmlns:debug="condition:DEBUG"
  mc:Ignorable="debug d"
  mc:ProcessContent="debug:*">
    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <!--Pivot Control-->
        <phone:Pivot Title="TEST">
            <!--Pivot item one-->
            <phone:PivotItem Header="extra debug panel">
                <Grid/>
            </phone:PivotItem>

            <phone:PivotItem Header="about">
                <Grid/>
            </phone:PivotItem>
        </phone:Pivot>
    </Grid>
</phone:PhoneApplicationPage>

How can I make the pivotitem "extra debug panel" conditional on the debug namespace again?

Doing debug:phone:PivotItem does not work

I would suggest putting your phone:Pivot inside debug:Grid.

<debug:Grid>
    <phone:Pivot Title="Test">
   ...
    </phone:Pivot>
</debug:Grid>