First: idea: 1. A subclass MyChildWindow 2 is derived from ChildWindow. add an image attribute to MyChildWindow: Source 3. create a TestChildWindow XAML 4 from MyChildWindow. redefine the style and add an Image object to bind Source and Image. port the defined style to the MyChildWindow Class 6. completion 1. A subclass MyChildWindow 2 is derived from ChildWindow. add an image attribute to MyChildWindow: Source code: [csharp] public class MyChildWindow: ChildWindow {public MyChildWindow () {} www.2cto.com public static DependencyProperty SourceProperty = De PendencyProperty. register ("Source", typeof (ImageSource), typeof (MyChildWindow), null); public ImageSource Source {get {return (ImageSource) (base. getValue (MyChildWindow. sourceProperty);} set {base. setValue (MyChildWindow. sourceProperty, value) ;}} 3. then, create a XAML: [html] <controls: MyChildWindow x: Class = "SilverlightApplication1.ChildWindow2" xmlns = "http: // sch of TestChildWindow Emas.micro soft.com/winfx/2006/xaml/presentation "xmlns: x =" http://schemas.microsoft.com/winfx/2006/xaml "xmlns: controls =" clr-namespace: silverlightApplication1 "Width =" 400 "Height =" 300 "Title =" ChildWindow2 "Source ="/SilverlightApplication1; component/images/1.png"> <Grid x: name = "LayoutRoot" Margin = "2"> <Grid. rowDefinitions> <RowDefinition/> <RowDefinition Height = "Auto"/> </Grid. rowDefinitions> <Ton x: Name = "CancelButton" Content = "cancel" Click = "CancelButton_Click" Width = "75" Height = "23" HorizontalAlignment = "Right" Margin = "0, 12, 0, 0 "Grid. row = "1"/> <Button x: name = "OKButton" Content = "OK" Click = "OKButton_Click" Width = "75" Height = "23" HorizontalAlignment = "Right" Margin = "0,12, 79,0" Grid. row = "1"/> </Grid> </controls: MyChildWindow> CS: [csharp] public partial class ChildWindow2: MyChildWindow {pu Blic ChildWindow2 () {InitializeComponent ();} private void OKButton_Click (object sender, RoutedEventArgs e) {this. dialogResult = true;} private void CancelButton_Click (object sender, RoutedEventArgs e) {this. dialogResult = false ;}} use Blend to modify the style. For example, bind the image Source 5. port the defined style to the MyChildWindow class project to create the Theme directory and Generic. the xaml file copies the style to Generic. modify TargetType = "local: MyChildWindow" in xaml to update the MyChildWindow class. Constructor: [csharp] public MyChildWindow () {this. defaultStyleKey = typeof (MyChildWindow);} 6. create a ChildWindow and modify the XAML and CS code!