Note that there are some explanatory texts on larger screens.

plurals
  1. POWPF Issue with TemplateBinding
    primarykey
    data
    text
    <p>I am using VS2008. I have this class</p> <pre><code>[System.Windows.Markup.ContentProperty("Child")] public class CaptionedBox : Control { static CaptionedBox() { DefaultStyleKeyProperty.OverrideMetadata(typeof(CaptionedBox), new FrameworkPropertyMetadata(typeof(CaptionedBox))); } public static readonly DependencyProperty ShadeVisibilityProperty = DependencyProperty.Register( "ShadeVisibility", typeof(Visibility), typeof(CaptionedBox), new PropertyMetadata(Visibility.Hidden)); } </code></pre> <p>and this code in a ResourceDictionary (in a file called Generic.xaml)</p> <pre><code>&lt;ControlTemplate TargetType="{x:Type wft:CaptionedBox}"&gt; &lt;Grid&gt; ... &lt;Rectangle Fill="#44000000" Visibility="{TemplateBinding ShadeVisibility}"/&gt; &lt;/Grid&gt; &lt;/ControlTemplate&gt; </code></pre> <p>There are no errors, no problems, I use this CaptionedBox all over the place.</p> <p>I have another XAML page in the same project that references this ResourceDictionary with Source="../Themes/Generic.xaml". When I open that page, it says "The resource dictionary XAML file has errors and cannot be loaded." It is referring to the Generic.XAML at that point. If I double click on the error message, even with Generic.XAML open in VS 2008, I get a different tab for what looks like a different Generic.xaml, except that the contents are identical and if I copy the full path for each of the tabs, I see this:</p> <p>C:\Source\LyonsForge\root\PumpServicing\branches\PSRT_1_0_2\Code\Bench\Controls\Wizard..\Themes\Generic.xaml C:\Source\LyonsForge\root\PumpServicing\branches\PSRT_1_0_2\Code\Bench\Controls\Themes\Generic.xaml</p> <p>which, although a bit awkward, are the same path.</p> <p>Any clues?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload