David G

David G

  • 1.5k
  • 224
  • 14.6k

WPF stroke/outline of text not seeing namespace

Feb 3 2018 2:03 AM

Hey all I have the current XAML code in my project:

<Window x:Class="DPF.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:local1="http://schemas.microsoft.com/xps/2005/06" xmlns:customTextOutline="clr-namespace:DPF.classes.other" mc:Ignorable="d" Title="MainWindow" Height="1920" Width="1080" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" ShowInTaskbar="False" WindowStyle="None"> <Grid> <customTextOutline:OutlinedTextBlock FontFamily="Verdana" FontSize="20pt" FontWeight="ExtraBold" TextWrapping="Wrap" StrokeThickness="1" Stroke="{StaticResource TextStroke}" Fill="{StaticResource TextFill}">                     blah blah balh            </customTextOutline:OutlinedTextBlock>            [etc etc....]        </Grid> </Window>

And my class (which is in classes/other/outlineText.cs folder):

namespace DPF.classes.other { [ContentProperty("Text")] public class OutlinedTextBlock : FrameworkElement { [etc... etc...] } }

All of that looks correct but its giving me an error of:

The name "OutlinedTextBlock" does not exist in the namespace "clr-namespace:DPF.classes.other".

So im not so sure why its saying that since that is the correct path to the file?


Answers (1)