Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

Created Unassigned: Need to add image in header section of childwindow [20238]

$
0
0
Need to add image control & text control in header of childwindow control.Tried to create subclass as shown below:
```
public class CustomChildWindow : ChildWindow
{
public override void OnApplyTemplate()
{
base.OnApplyTemplate();
var windowRoot = GetTemplateChild("PART_WindowRoot") as Grid;

if (NormalImage != null)
{
base.OnApplyTemplate();
Grid g = this.GetTemplateChild("Root") as Grid;
if(g!=null)

img.Source = this.NormalImage;
}

}
}
```
But line "base.OnApplyTemplate()" gives null exception.Please suggest any alternate to add image control in header of ChildWindow.
Thanks in advance.

Viewing all articles
Browse latest Browse all 4964

Trending Articles