Page 1 of 1

Error thrown when defining multiple Ignorable prefixes

Posted: 27 Feb 2024, 17:04
by David Jefferies
We want to have two Ignorable prefixes - the usual prefix 'd' and also 'design_only'

In Blend the syntax appears to be
mc:Ignorable="d design_only">
<Viewbox x:Name="RootViewbox"  Opacity="0" design_only:Opacity="1">
However Noesis gives the error
 Prefix 'design_only' is not defined
Am I missing a step or is multiple ignorable prefixes not supported?

Re: Error thrown when defining multiple Ignorable prefixes

Posted: 28 Feb 2024, 11:11
by jsantos
The prefixes in the Ignorable section must be declared too. Something like this works
<Grid
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  xmlns:design_only="ignorableUri"
  mc:Ignorable="d design_only">

  <StackPanel>
    <d:TextBlock>ONE</d:TextBlock>
    <design_only:TextBlock>TWO</design_only:TextBlock>
    <TextBlock>THREE</TextBlock>
  </StackPanel>
</Grid>

Re: Error thrown when defining multiple Ignorable prefixes

Posted: 28 Feb 2024, 13:10
by David Jefferies
Thanks for the reply - I see now the problem was that I was declaring both the prefixes to be the same
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
xmlns:design_only="http://schemas.microsoft.com/expression/blend/2008" 
By changing the design_only prefix to be some other Uri, as in your example, it now works
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
xmlns:design_only="ignorableUri"
thanks!