Abstract functionality of a window in WPF
Abstract functionality of a window in WPF
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="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 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
Quote:
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
RE: Abstract functionality of a window in WPF
This WPF/XAML is going to take a little getting used to!
"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