出于强迫症,我查了一下文档弄明白了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. Windows下cpu使用的监控

    这里有一篇来自微软的文章,主要讲WPA如何使用,但是前面关于进程调度的介绍很给力,非常好的学习操作系统的材料: https://msdn.microsoft.com/en-us/library/jj6 ...

  2. selenium webdriver——JS滚动到指定位置

    1.DOM滚动方法 1.scrollIntoView(alignWithTop)  滚动浏览器窗口或容器元素,以便在当前视窗的可见范围看见当前元素.如果alignWithTop为true,或者省略它, ...

  3. C++Builder 也有StringBuilder

    System::Sysutils::TStringBuilder *sb = new TStringBuilder;    sb->Append("ww");    sb-& ...

  4. Spring Boot自动配置

    Spring Boot自动配置原理 Spring Boot的自动配置注解是@EnableAutoConfiguration, 从上面的@Import的类可以找到下面自动加载自动配置的映射. org.s ...

  5. IMMDevice::Activate and specifying IID_IBaseFilter as the interface identifier

    Use the IMMDevice pointer to the endpoint returned by the enumeration process to activate the desire ...

  6. 埃氏筛法求素数&构造素数表求素数

    埃氏筛法求素数和构造素数表求素数是一个道理. 首先,列出从2开始的所有自然数,构造一个序列: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 1 ...

  7. UNITY 打APK是如何确定哪些资源有用哪些无用的

    一切从build settings开始,它即是 构建列表,构建运行包当然从它开始. 1,只有在构建列表中的场景和场景引用资源才会被打进包里,其它资源除了2,3位置都不会被打包 2,streamming ...

  8. jsp的静态导入

    <body> <!-- include 包括 包含 页面相互引用 静态引入 把多工文件 合并为一个文件 然后在编译 不要有重复的变量 --> <h1>this is ...

  9. 清华镜像站安装docker

    https://mirrors.tuna.tsinghua.edu.cn/help/docker-ce/

  10. ubuntu server 安装nextcloud12

    1.更新系统安装必要的依赖包 [user]$ sudo apt-get update && sudo apt-get -y upgrade [user]$ sudo apt-get i ...