I seem unable to derive a window from my own abstract class that derives from window.
My code worked great when I was using Windows Forms, I was told I should start using WPF and now I can't get it to work?
ProgressForm - Abstract class
Progress_Info - Concrete window class derived from ProgressForm
Progress_Info XAML
Error
Yes it does, intelisense even provided me the option?
What am I doing wrong? This was easy in WinForm, I'm clearly missing something obvious in WPF.
Thanks,
1DMF
"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music
My code worked great when I was using Windows Forms, I was told I should start using WPF and now I can't get it to work?
ProgressForm - Abstract class
Code:
namespace HLP_Class_Library
{
public abstract class ProgressForm : Window
{
public abstract void AddMessage(string msg);
public abstract void ClearMessage();
}
}
Progress_Info - Concrete window class derived from ProgressForm
Code:
namespace HLP_Class_Library
{
/// <summary>
/// Interaction logic for Progress_Info.xaml
/// </summary>
public partial class Progress_Info : ProgressForm
{
public Progress_Info()
{
InitializeComponent();
}
// add messages to form
public override void AddMessage(string msg)
{
if (msg != null && msg != "")
{
this.Progress.AppendText(msg);
}
}
// clear form messages
public override void ClearMessage()
{
this.Progress.Document.Blocks.Clear();
}
}
}
Progress_Info XAML
Code:
<src:ProgressForm
x:Class="HLP_Class_Library.Progress_Info"
xmlns="[URL unfurl="true"]http://schemas.microsoft.com/winfx/2006/xaml/presentation"[/URL]
xmlns:x="[URL unfurl="true"]http://schemas.microsoft.com/winfx/2006/xaml"[/URL]
xmlns:src="clr-namespace:HLP_Class_Library"
Title="Progress_Info" Height="300" Width="300">
<Grid>
<RichTextBox x:Name="Progress" HorizontalAlignment="Left" Height="270" VerticalAlignment="Top" Width="292">
<FlowDocument>
<Paragraph>
<Run Text="RichTextBox"/>
</Paragraph>
</FlowDocument>
</RichTextBox>
</Grid>
</src:ProgressForm>
Error
The name "ProgressForm" does not exist in the namespace "clr-namespace:HLP_Class_Library".
Yes it does, intelisense even provided me the option?
What am I doing wrong? This was easy in WinForm, I'm clearly missing something obvious in WPF.
Thanks,
1DMF
"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music