出于强迫症,我查了一下文档弄明白了WPF脱离xaml应该怎么搞。当然其实本质是为了MaxScript里使用做准备。

using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input; namespace SimpleWPF
{
public static class Program
{
[STAThread]
public static void Main()
{
Window theWindow = new Window();
theWindow.Height = ;
theWindow.Width = ; Button theButton = new Button();
theButton.Content = "Button";
theButton.Click += delegate(object sender, RoutedEventArgs e) { MessageBox.Show("Click"); }; theWindow.Content = theButton;
Application theApplication = new Application();
theApplication.Run(theWindow);
}
}
}

没有xaml的WPF的更多相关文章

  1. 11、创建不使用XAML的WPF应用程序

    首先新建一个空的项目,然后添加一个类,引用一下程序集: PresentationCore.dll PresentationFramework.dll WindowsBase.dll namespace ...

  2. 无Xaml的WPF展示

    我们创建一个wpf应用程序,我们把里面的xaml文件全部删除,添加一个新类: 如下图: 然后我们cs文件中的代码: using System; using System.Collections.Gen ...

  3. [XAML]类似WPF绑定的Binding的读取方法

    在WPF的XAML里,依赖属性可以使用基于BindingBase之类的MarkupExtensin 读取XAML时,会自动的把该BindingBase转换为BindingExpressionBase ...

  4. 使用XAML在WPF项目中承载ArcGIS Engine地图控件开发

    原文 http://blog.csdn.net/flexmapserver/article/details/5868882 用Windows Form进行ArcGIS Engine二次开发时常见的形式 ...

  5. 微软XAML Studio - WPF, Sliverlight, Xamarin, UWP等技术开发者的福音

    目录 编辑器功能 数据源功能 调试数据绑定 伟大的开始 我们来一起实践吧 最近又在继续倒腾WPF的项目,继续使用Caliburn.Micro和Xceed来堆代码.每次调试xaml上的binding,都 ...

  6. WPF入门:XAML

    XAML是WPF技术中专门用于设计UI的语言 XAML优点最大的优点是将UI与逻辑代码剥离 创建第一个WPF应用程序 VS默认生成的WPF项目解决方案 Properties:里面主要包含了程序用到的一 ...

  7. 【WPF系列】基础学习-XAML

    引言 WPF框架中已经提到,WPF框架提供XAML基本服务.WPF中XAML的引入向开发者提供UI设计和代码分离的编程型.XAML是WPF中提出的一个具有重要意义的新技术,基本涉及WPF中所有UI开发 ...

  8. WPF整理-XAML构建后台类对象

    1.XAML 接触WPF的第一眼就是XAML---XAML是用来描绘界面的.其实不然! "Actually, XAML has nothing to do with UI. It's mer ...

  9. WPF之旅(二)- XAML

    什么是XAML XAML(Extensible Application Markup Lanaguage的简写,发音“zammel”)是用于实例化.NET对象的标记语言.尽管XAML是一种可以用于诸多 ...

随机推荐

  1. centos7.3下apache搭建django[未成功]

    1 apache肯定已经按照完毕了, 如果没有  yum install httpd yum install mod_wsgi 安装完成之后,mod_wsgi.so会在Apache的modules目录 ...

  2. python3操作MySQL数据库

    安装PyMySQL 下载地址:https://pypi.python.org/pypi/PyMySQL 1.把操作Mysql数据库封装成类,数据库和表先建好 import pymysql.cursor ...

  3. leetcode561

    public class Solution { public int ArrayPairSum(int[] nums) { var list = nums.OrderBy(x => x).ToL ...

  4. C# MemoryStream先写后读的奇怪现象

    static void Main(string[] args) { MemoryStream ms = new MemoryStream(); BinaryWriter bw = new Binary ...

  5. Python time、datetime

    简介: 记录一下 Python 如何获取昨天.今天.明天时间及格式化. 1.今天 In [1]: import time In [2]: print time.strftime('%Y.%m.%d', ...

  6. S 导客户主数据 及更新销售团队、组织、品牌

    一.导入客户主表(INSERT) EXCEL模板 [Public] ConnectString=host="siebel://10.10.0.46:2321/HC_CRM/SMObjMgr_ ...

  7. 隐藏Android下的虚拟按键

    要隐藏Android下的虚拟按键,可通过如下办法操作 adb root adb remount adb shell ls -al /system/build.prop   (查看文件权限) -rw-r ...

  8. Python help() 函数

    Python help() 函数  Python 内置函数 描述 help() 函数用于查看函数或模块用途的详细说明. 语法 help 语法: help([object]) 参数说明: object ...

  9. sqlserver流程控制(待续)

    if else: if(1=1) begin--必须1个=号print '111'--begin end 之间必须要有内容end else beginprint '222'end while: DEC ...

  10. asp.net安装指令

    cd \ cd C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319aspnet_regiis.exe -i注册.NET4到IIS