; fe2.SetValue(TextBox.WidthProperty,100.0); fe2.SetValue(TextBox.HeightProperty, 100.0);
//把要呈现的显示内容封装起来 FrameworkElementFactory f = new FrameworkElementFactory(typeof(Grid), "Grid"); f.AppendChild(fe); f.AppendChild(fe2);
//控件模板 ControlTemplate ct = new ControlTemplate(typeof(Button)); ct.VisualTree = f;
//修改Button 的Template Button btn = new Button(); 上一页 [1] [2] [3] 下一页
|
|