2023-11-23 23:46:40 +08:00
|
|
|
|
using CPF;
|
|
|
|
|
using CPF.Animation;
|
|
|
|
|
using CPF.Charts;
|
|
|
|
|
using CPF.Controls;
|
|
|
|
|
using CPF.Drawing;
|
|
|
|
|
using CPF.Shapes;
|
|
|
|
|
using CPF.Styling;
|
|
|
|
|
using CPF.Svg;
|
|
|
|
|
using CPF.Toolkit.Controls;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
namespace CPF.Toolkit.Demo
|
|
|
|
|
{
|
|
|
|
|
public class TestMdiView : Window
|
|
|
|
|
{
|
|
|
|
|
protected override void InitializeComponent()
|
|
|
|
|
{
|
|
|
|
|
this.CanResize = true;
|
|
|
|
|
this.Title = "标题";
|
|
|
|
|
this.Width = 1280;
|
|
|
|
|
this.Height = 720;
|
|
|
|
|
this.Background = null;
|
2023-11-24 17:31:24 +08:00
|
|
|
|
var frame = this.Children.Add(new WindowFrame(this, new MdiHost
|
2023-11-23 23:46:40 +08:00
|
|
|
|
{
|
2023-11-24 22:58:59 +08:00
|
|
|
|
//Children =
|
|
|
|
|
//{
|
|
|
|
|
// new MdiWindow
|
|
|
|
|
// {
|
|
|
|
|
// Title = "test",
|
|
|
|
|
// Content = new WrapPanel
|
|
|
|
|
// {
|
|
|
|
|
// Children =
|
|
|
|
|
// {
|
|
|
|
|
// new Button{ Content = "test" ,Width = 100, Height = 35 },
|
|
|
|
|
// new Button{ Content = "test" ,Width = 100, Height = 35 },
|
|
|
|
|
// new Button{ Content = "test" ,Width = 100, Height = 35 },
|
|
|
|
|
// new Button{ Content = "test" ,Width = 100, Height = 35 },
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
}
|
|
|
|
|
.LoopCreate(5,(i) => new MdiWindow
|
|
|
|
|
{
|
|
|
|
|
Title = $"test{i}",
|
|
|
|
|
Content = new WrapPanel
|
|
|
|
|
{
|
2023-11-23 23:46:40 +08:00
|
|
|
|
}
|
2023-11-24 22:58:59 +08:00
|
|
|
|
.LoopCreate(5,k => new Button { Content = $"test{k}",Width = 100, Height = 35 }),
|
|
|
|
|
})));
|
2023-11-24 14:26:26 +08:00
|
|
|
|
frame.CaptionBackgrund = "white";
|
|
|
|
|
frame.CaptionForeground = "black";
|
|
|
|
|
frame.ControlBoxStroke = "black";
|
|
|
|
|
frame.MaximizeBox = true;
|
2023-11-23 23:46:40 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|