WPF: Using VS, we can create 2 kinds of WPF applications, one is desktop application " WPF Application" another is Web RIA application " WPF Browser Application";
VS: An IDE;
Create a WPF "Hello world" Application:
File -> New project -> WPF Application; (HelloWorld)
We can see the auto-create file at the VS right panel Solution Explorer, where display all files of our project; And we should know the usage of each file and folder:
Properties folder contain and properties of project; we can add new resource from here;
Reference folder contain some libs for running project;
app.config is configurations file;
app.xaml is whole layout setting, the Application will load this file at first;
<Application x:Class="HelloWorld.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml"> // When app is loading, MainWindow will be start;
<Application.Resources>
</Application.Resources>
</Application>
In this files tree, every instance of window have a branch like MainWindow; And xaml file is layout file, corresponding cs file is C# file which will respond to all requests and events sent from window;
When we create a new window, we can use grid to set layout;
We need to write much C# code to deal with the event; WPF offer some basic event, to which we can depart some complex event;
My Example:
Create a new WPF App,C_SMS,
First thing we need to set the most top Grid, to build a nice frame to display your layout; you can design your Grid at UI design view, it's very easy and intuitive to make it out;
now, you have an static UI,what you need to do just add some events; there are a simple way to implement Dragging control; right click "solution explorer" to add reference, and find two lib files:
"Microsoft.Expression.Interactions.dll"
"System.Windows.Interactivity.dll"
from MS expression blend 4
then add below to MainWindow.xaml
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:b="http://schemas.microsoft.com/expression/2010/interactions"
add below to control which you want to drag it
<i:Interaction.Behaviors>
<b:MouseDragElementBehavior Dragging="" DragFinished=""/>
</i:Interaction.Behaviors>
We should write C# function to deal with events Dragging and DragFinished;
分享到:
相关推荐
这个例子“WPF做的一个Visual Studio界面的例子”显然是为了演示如何使用WPF技术来创建类似于Visual Studio的用户界面,这在开发自定义IDE或工具时非常有用。 **WPF与Visual Studio界面设计** 1. **XAML语言**: ...
在本文中,我们将深入探讨如何使用Visual Studio 2017、C#和WPF结合MaterialDesign库来创建一个工控界面。MaterialDesign是一种现代化的用户界面设计风格,源自谷歌的Material Design规范,它提供了丰富的视觉效果和...
《Professional Visual Studio® 2005》这本书是专为那些使用Windows Vista操作系统,并希望过渡到Visual Studio 2005作为开发环境的程序员准备的。由于Visual C++ 6.0不支持Vista,因此这本书成为了升级工具的宝贵...
3. **Windows Forms和WPF开发**:对于桌面应用开发者,Visual Studio Express 2010 提供了Windows Forms和Windows Presentation Foundation (WPF)的开发工具,使用户能够创建具有丰富图形界面的应用程序。...
标题中的“二次元老婆们的画廊WPF3D@VisualStudio”表明这是一个使用WPF(Windows Presentation Foundation)的3D图形技术,结合Visual Studio IDE创建的项目,旨在展示一系列二次元角色的图像,可能类似于一个3D...
Blend for Visual Studio 2013与Visual Studio深度集成,为WPF和Windows Store应用的UI设计提供了更强大的工具。它支持SketchFlow预览,让设计师可以快速创建和迭代用户界面原型。 6. **团队基础服务器2013集成**...
12. 创建应用:Visual Studio 提供了多种方式来创建应用,例如创建 C# 应用、Web 应用、UWP 应用、WPF 应用程序、Windows 窗体应用程序等。 13. 视频教程:Visual Studio 提供了视频教程,例如创建 ASP.NET Core ...
在本文中,我们将深入探讨如何使用Visual Studio 2017、C#和WPF(Windows Presentation Foundation)的DependencyProperty来实现依赖属性。DependencyProperty是WPF框架中的一个核心概念,它允许UI元素和数据之间...
《Visual Studio 2008:面向对象编程的利器与界面设计大师》 Visual Studio 2008,作为微软公司推出的一款强大的集成开发环境(IDE),是编程者们钟爱的工具之一,尤其在面向对象编程领域,它以其丰富的功能和优秀...
Mastering Visual Studio 2019, 2nd Edition: Explore the new features in Visual Studio 2019 and build apps using WPF, .NET Core, TypeScript, and Azure Visual Studio 2019 is the latest IDE from ...
As a technical buff, Kunal has in-depth knowledge of OOPs, C#, XAML, .NET, WPF, UWP, Visual Studio, Windows 10 and Microsoft Azure. He is also proficient in entire Software Development Life Cycle ...
### Visual Studio 2022 使用教程及关键知识点详解 #### 一、概述 Visual Studio 2022 是微软最新发布的集成开发环境(Integrated Development Environment, IDE),它支持多种编程语言和技术栈,如.NET、C++、...
在本文中,我们将深入探讨如何使用Windows Presentation Foundation (WPF) 创建一个类似于Visual Studio的编辑界面,这个界面具有可拖动的功能。WPF是.NET Framework的一部分,它为开发富客户端应用程序提供了强大的...
《WPF In Action with Visual Studio 2008》是一本深入探讨Windows Presentation Foundation(WPF)技术,并结合Visual Studio 2008开发环境的实战指南。这本书旨在帮助开发者充分利用WPF的强大功能,创建出具有丰富...
Visual Studio 2013 社区版是微软推出的一款集成开发环境(IDE),专为个人开发者、学生和小型团队提供免费的开发工具。这款IDE支持多种编程语言,包括C++、C#、VB.NET、JavaScript等,适用于构建桌面应用、Web应用...
1. 用户界面:使用Visual Studio的Windows Forms或WPF技术构建,提供友好、直观的交互界面。 2. 数据访问层:使用ADO.NET与SQL数据库交互,实现数据操作。 3. 业务逻辑层:处理业务规则,如验证输入、计算平均分等。...
在开发世界中,Visual Studio作为一款强大的集成开发环境(IDE),为程序员提供了广泛的功能和支持。然而,为了进一步提升效率和个性化开发体验,许多开发者选择安装各种实用插件。本篇文章将详细探讨“Visual Studio ...