I have a WPF form where I am trying to add an icon. In the properties menu I selected my icon from my resources folder. In the design view, the icon appears where it should. When I go to run the application, it shows the default view. I've checked several sources. The most common response is to set it to the main form which I did as well. Below is what my code looks like.
//in private void InitializeComponent()
{
this.Load += new System.EventHandler(this.CallTrak_Load);
}
//in CallTrak.Load
private void CallTrak_Load(object sender, EventArgs e)
{
System.Drawing.Icon ico = Properties.Resources.favicon;
this.Icon = ico;
}
So, my question is as it relates to the title of this post, am I loading my icon incorrectly at runtime? If so, suggestions on how to do so correctly. What else should I check to see what my problem is?