Why AlternateContent isn't displayed in Visual Studio WPF Xaml Designer view?

31 Views Asked by At

Why can't I watch any mc:AlternateContent contents in Visual Studio WPF Xaml Designer view ?

<Window x:Class="XamlDebug_NewAlternateContent.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:XamlDebug_NewAlternateContent"
    mc:Ignorable="d"
    Title="MainWindow" Height="450" Width="800">

<Grid>
    <mc:AlternateContent>
        <mc:Choice Requires="local">
                <Border Background="AntiqueWhite" BorderBrush="Black" BorderThickness="1" Margin="5">
                    <TextBlock Text="TextBlock" TextAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center" />
                </Border>
        </mc:Choice>
    </mc:AlternateContent>
</Grid>

I found information about AlternateContent from learn.microsoft.com (https://learn.microsoft.com/en-us/openspecs/sharepoint_protocols/ms-vsdx/31f268c1-4c6b-468e-b080-25152dc8fd32) and from ISO specification (https://www.iso.org/standard/65533.html) but it only brings me to think this lack of overview in designer is only linked to Visual Studio XAML designer.

What is the root cause of this ? Is it a lack of feature from Visual Studio ? Or a specific process impacting namespace availability I don't understand ?

(my example could looks weird but it is only to focus on the question ; the real implementation needed is linked to a DEBUG content setup, like it is explained in https://stackoverflow.com/a/19940157 for instance)

0

There are 0 best solutions below