WPF页面转换控制 [英] WPF Page transition Control

查看:69
本文介绍了WPF页面转换控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我可以获得有关如何将用户控件(页面转换控件)添加到wpf工具箱的信息。

解决方案

据我所知,这不是关于控制开发的问题,所以,转换控制与否,这是无关紧要的。



你没有必须做任何特别的事情。当您成功开发控件并使用此控件构建解决方案时,它将显示在工具箱中。但是,您需要使用程序集中的控件来引用程序集(当然,如果它们是单独的程序集)。此外,您需要知道如何在您使用它的XAML中引用新开发的控件。它实际上并不需要使用工具箱。基本上,您只需要在XAML中添加一个额外的命名空间,并以某种方式命名。您实际上不需要记住命名空间命名约定,因为Visual Studio Intellisense 将帮助您根据已经引用的程序集选择命名空间。



您可以找到一些基本代码示例,例如: http://www.c-sharpcorner.com/uploadfile/mahesh/user-control-in-wpf/ [ ^ ]。



此CodeProject文章也可以是有用:如何创建WPF用户控制与控制在WPF应用程序(C#)中使用它 [ ^ ]。



-SA

Hi,

Can i have info about how to add usercontrol(pagetransition control) to the wpf Toolbox.

解决方案

As I understand, this is not a question on control development, so, transition control or not, this is irrelevant.

You don't have to do anything special. When you successfully develop a control and build a solution with this control, it will appear in the toolbox. However, you need to reference the assembly with a control by an assembly where you want to use it (if they are separate assemblies, of course). Besides, you need to know how to reference a newly developed control in your XAML where you use it. It does not really require the use of the toolbox. Basically, you just need to add an additional namespace to your XAML and name if in a certain way. You don't really need to remember the namespace naming conventions, because Visual Studio Intellisense will help you to choose the namespace based on the assemblies you have already referenced.

You can find some basic code sample, for example, here: http://www.c-sharpcorner.com/uploadfile/mahesh/user-control-in-wpf/[^].

This CodeProject article can also be useful: How to Create a WPF User Control & Use It in a WPF Application ( C# )[^].

—SA


这篇关于WPF页面转换控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆