使用教程如下:
1、下载应用dll文件
2、增加一个子页面
2.1、子页面的xaml中的需要更改:
原来:
<controls:ChildWindow x:Class="Abs.IBR.PI.Project.Examiner"
……
xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
……
<controls:ChildWindow.Title>
……
</controls:ChildWindow.Title>
……
</controls:ChildWindow>
改为:
<controls:FloatableWindow x:Class="Abs.IBR.PI.Project.ExaminerTest"
……
xmlns:controls="clr-namespace:System.Windows.Controls;assembly=FloatableWindow"
……
<controls:FloatableWindow.Title>
……
</controls:FloatableWindow.Title>
……
</controls:FloatableWindow>
2.2、子页面的cs文件中需要更改为:
原来:
public partial class Examiner : ChildWindow
改为:
public partial class ExaminerTest : FloatableWindow
3、在应用的父页面中,调用子页面的方法为:
private void Examiner_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
//Examiner ex = new Examiner();
//ex.Show();
ExaminerTest extest = new ExaminerTest();
extest.ParentLayoutRoot = this.LayoutRoot;
extest.ResizeMode = ResizeMode.CanResize;
extest.ShowDialog();
}