使用Visual Studio WPF编辑器无法创建一个图形用户界面Windows图形用户界面 [英] Using the visual studio wpf editor to create an gui not for windows gui

查看:800
本文介绍了使用Visual Studio WPF编辑器无法创建一个图形用户界面Windows图形用户界面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是相当难问题的标题来解释,但我想实现的是:

It's quite hard to explain in question title, however what I want to achieve is this:

我想用XAML(也可能是可视化编辑器)创建,将无法在MS Windows图形用户界面,但对位图(从System.Drawing中的位图类,而不是文件)呈现的GUI。

I would like to use XAML (and possibly the visual editor) to create GUIs that won't be rendered on "MS Windows GUI" but on Bitmaps (the bitmap class from System.Drawing, not files).

这是因为我想创建一个简单的方法来打印在G19小屏幕,它有。

This because I would like to create an easy way to "print" over the G19 small screen that it has.

我已经建立了一个图书馆,让我轻松地填满屏幕与位图图像。现在,我想进一步采取步骤,使人们与Visual Studio用WPF编辑器创建他们做的小程序更快,更简单。

I already built a library that allows me to easily fill the screen with Bitmap images. Now I would like to take the step further, allowing people with visual studio to make applet faster and easier by creating them with wpf editor.

Obviusly我需要建立所有组件(的TextBlocks,Progressbars和图像),但是这不是一个问题。

Obviusly I need to build all components (TextBlocks, Progressbars and Images), but that's not a problem.

我需要一些指引,以及一些建议,因为我不很清楚从哪里创造的东西,将完全取代了XAML文件标记(如用户控件一样)时启动。

I need some guidelines to follow and some suggestion because I don't know very well where to start from when creating something that will totally replace the tag in a xaml file (like UserControl does).

我obviusly不需要鼠标/键盘互动与GUI因为要处理的屏幕,我会使用一些被用于这一目的建造键。

I obviusly don't need mouse/keyboard interaction with the gui because to handle the screen I'll use some keys that are built for that purpose.

这是我应该在哪里,从内置这个事情开始任何建议?我需要从的MarkupExtension类继承?我需要一些教程的链接类似的东西,如果可能的话(obviusly我将这些教程适应我的需要)

Any suggestion on where should I start from to built this thing? Do I need to inherit from MarkupExtension class?I need some links to tutorials for something similar if possible (obviusly I will adapt those tutorials to my needs)

甚至有可能以做这样的事情?

感谢您的任何建议。

推荐答案

我更熟悉的DependencyObject类比的MarkupExtension,所以这是在那里我会开始。 (在它表面看起来的MarkupExtension在阅读性能进一步限制阅读)创建的DependencyObject的延伸,将允许你创建新的XAML标记,并与他们互动programaticly(我不知道这是否必要或没有),你可以通过在依赖暴露静态DependencyProperties添加属性对象。

I'm more familiar with the DependencyObject class than MarkupExtension, so that is where I would start. (On it's surface it looks like MarkupExtension is limited in reading properties Further Reading) Creating an extension of DependencyObject will allow you to create new xaml tags, and interact with them programaticly (I don't know if that's necessary or not), and you can add properties by exposing static DependencyProperties on the dependency objects.

下面是一个 DependencyObject的教程我没有使用,但在表面上似乎有大部分元素,你就需要开始。

Here's a DependencyObject tutorial that I haven't used, but on the surface appears to have most of the elements that you would need to get started.

这篇关于使用Visual Studio WPF编辑器无法创建一个图形用户界面Windows图形用户界面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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