整合营销服务商

电脑端+手机端+微信端=数据同步管理

免费咨询热线:

用DevExpress实现基于HTML&CSS的桌面应用程序的UI(一)

evExpress WinForm拥有180+组件和UI库,能为Windows Forms平台创建具有影响力的业务解决方案。DevExpress WinForm能完美构建流畅、美观且易于使用的应用程序,无论是Office风格的界面,还是分析处理大批量的业务数据,它都能轻松胜任!

注意:目前基于HTML & CSS的控件正在积极研发中,可以作为技术预览提供,如果需要使用请下载最新版组件体验哦~

DevExpress WinForms Subscription官方最新版免费下载试用,历史版本下载,在线文档和帮助文件下载-慧都网

一组控件和组件允许开发人员构建HTML格式的UI,并使用CSS样式自定义UI元素的外观设置、大小、填充和布局选项,不再需要处理自定义绘制事件或更改大量属性来修改控件以匹配UI规范,可以使用HTML和CSS标记的知识为桌面应用程序构建布局。

主要功能包括:

  • 在HTML标记中指定数据绑定表达式,以显示来自底层数据源的值。
  • 使用CSS创建响应式UI——当用户鼠标指针悬停在或单击特定元素上时添加效果。
  • 向UI添加外部控件(例如,文本框)。
  • 处理控件事件来响应UI元素鼠标动作。
  • 启用DirectX硬件加速来获得更好的性能。

HTML-CSS标记

支持HTML和CSS的控件和组件从模板呈现它们的UI,控件模板的HTML标记指定控件的内容(UI元素),而模板的CSS代码指定应用于UI元素的样式、显示和布局设置。

使用控件的HtmlTemplate属性来指定模板,在设计时,开发人员可以在HTML Template Editor(HTML模板编辑器)中创建模板。

该编辑器支持语法高亮显示、智能感知(一种代码完成辅助工具)和预览面板,预览面板允许开发人员检查可视元素——将鼠标悬停在元素上时定位的HTML标记。

示例

下面的示例演示了一个HtmlContentControl从指定的HTML-CSS模板呈现一个UI,该控件被绑定到Employee对象的列表。模板的HTML代码包含数据绑定表达式,用于显示来自数据源的值。

C#

public class Employee {
public string DisplayName { get; set; }
public string FullName { get; set; }
public SvgImage Photo { get; set; }
}
//...
Employee emp = new Employee();
emp.DisplayName = "Leah Test Coordinator";
emp.FullName = "Leah Simpson";
SvgImageCollection imageCollection = new SvgImageCollection();
imageCollection.Add("photo", "image://svgimages/icon builder/business_businesswoman.svg");
emp.Photo = imageCollection["photo"];
List<Employee> list = new List<Employee>();
list.Add(emp);
htmlContentControl1.DataContext = list;
//...
void OnButtonClick(object sender, DxHtmlElementMouseEventArgs args) {
if(args.ElementId == "uploadBtn") {
//...
}
if (args.ElementId == "removeBtn") {
//...
}
XtraMessageBox.Show("Button " + args.ElementId + " clicked");
}

VB.NET

Public Class Employee
Public Property DisplayName() As String
Public Property FullName() As String
Public Property Photo() As SvgImage
End Class
'...
Dim emp As Employee = New Employee()
emp.DisplayName = "Leah Test Coordinator"
emp.FullName = "Leah Simpson"
Dim imageCollection As SvgImageCollection = New SvgImageCollection()
imageCollection.Add("photo", "image://svgimages/icon builder/business_businesswoman.svg")
emp.Photo = imageCollection("photo")
Dim list As New List(Of Employee)()
list.Add(emp)
htmlContentControl1.DataContext = list
'...
Private Sub OnButtonClick(ByVal sender As Object, ByVal args As DxHtmlElementMouseEventArgs)
If args.ElementId = "uploadBtn" Then
'...
End If
If args.ElementId = "removeBtn" Then
'...
End If
XtraMessageBox.Show("Button " & args.ElementId & " clicked")
End Sub

HTML

<div class="container" id="container">
<div class="avatarContainer">
<img src="${Photo}" class="avatar">
<div id="uploadBtn" onclick="OnButtonClick" class="centered button">Upload</div>
<div id="removeBtn" onclick="OnButtonClick" class="centered button">Remove</div>
</div>
<div class="separator"></div>
<div class="avatarContainer ">
<div class="field-container">
<div class="field-header">
<b>Display name</b><b class="hint">Visible to other members</b>
</div>
<p>${DisplayName}</p>
</div>
<div class="field-container with-left-margin">
<div class="field-header">
<b>Full name</b><b class="hint">Not visible to other members</b>
</div>
<p>${FullName}</p>
</div>
</div>
</div>

CSS

<script src="https://lf6-cdn-tos.bytescm.com/obj/cdn-static-resource/tt_player/tt.player.js?v=20160723"></script>

When you're answering IELTS speaking questions, do you sometimes ramble, go round in circles, get lost, or even forget the question? So, yeah, I think that I've forgotten the question. . .

当你回答雅思口语问题时,你是否有时会漫不经心、绕圈子、迷茫,甚至忘记了问题?嗯,我忘了这个问题......

If you do, it's bringing your fluency score down but don't worry, you're not alone. It happens to many people.

如果你就是这样,这会降低你的流利度分数,但不用担心,你并不孤单。很多人都会这样。

And in this video, I'm going to show you some natural and advanced fillers and connectors that will up your fluency level. Hi, my name is Keith.

在本期视频中,我将向你们展示一些自然和高级的填充词和关联词,提高你们的流利程度。嗨,我叫基斯。

If you don't know me, I run the website ieltsspeakingsuccess, trying to give you better English, better answers, and get a higher score on IELTS speaking. I also run free live lessons on Facebook, Facebook live every Tuesday and Thursday.

如果你不认识我,我运营 ieltsspeakingsuccess 网站,致力于提高学生的英语,让学生们在雅思口语考试中作出更好的回答,拿到更高的分数。我还在脸书上有免费的直播课程,时间是每周二和周四。

Check out the link below, 10 a. m. 10 a. m. Spanish time. I also have an online course on udemy: IELTS Speaking Success Get a Band 7+.

点击下面链接看看吧。我在 udemy 上有一门线上课程:IELTS Speaking Success Get a Band 7+。

Check it out if it's right for you. Today, then we're going to look at fillers and improving your fluency.

适合你的话就去看看吧。今天,我们要学填充词和提高你的流利度。

So, fluency makes up 25% of your score in the IELTS speaking, right? It consists of hesitation:

在雅思口语考试中,流利度占你分数的25%。它包括犹豫:

I, I, I live. . . repetition:

我,我,我住在......重复:

I want, I want, I want, I want, I want to, I want to. . . . . . arrange of connectives and discourse markers.

我想,我想,我想,我想,我想,我想,我想......以及关联词和话语标志的使用。

And what are they? Well, connectives and discourse markers are rather fancy names for fillers and signposts.

它们是什么呢?嗯,关联词和话语标志就是填充词和标志词的另一种说法。

To improve your fluency, you need to be coherent; you need to connect your ideas and your sentences with good connectors and fillers and show the examiner what you're going to say. Now, many people have a limited range.

为了提高你的流利度,你需要连贯;你需要把你的想法和句子用恰当的关联词和填充词连接起来,向考官展示你要说什么。很多人掌握的这些词都是有限的。

They repeat the same connectors. And I think also. . . I also think that. . . and I think. . . I think. . .

他们重复使用一些关联词。我还认为......我还觉得......我觉得......我认为......

For a band 7 and above, you need a wide range of connectors and discourse markers. First and foremost, I love desserts, but that said, I only eat them now and again.

要拿七分以上,你需要用上大量的关联词和话语标志。首先,我喜欢甜点,不过,我只是偶尔吃。

So, let's have a look at what we do in IELTS speaking. We need to give opinions, right, add information, emphasize, clarify, compare and contrast, conclude.

我们看看在雅思口语中是怎么做的。我们需要表达观点,对吧,补充信息,强调,阐明,比较和对比,总结。

And we'll be using different language to do this. We may be saying, for example, "I think", "also", "I really think", "I mean", "but", "however", "in conclusion", and all of these are good, but they're not enough.

我们会使用不同的词去完成。例如,我们可能会说“我认为”、“而且”、“我真的认为”、“我的意思是”、“但是”、“然而”、“总而言之”,所有这些都是不错的,但它们还不够。

You need a wider range of connectors to impress the examiner and really push up your fluency. So, let's have a look at each of these different areas and how we can expand your fillers.

你需要更广泛的关联词来打动考官,真正提高你的流利度。我们来看看这些不同的方面以及我们如何扩充我们的填充词。

So, let's look first of all at opinions, giving opinions. Take this question: Do you like going to museums?

那么,我们首先看看观点,表达观点。例如这个问题:你喜欢去博物馆吗?

Well, to be honest, I'm not a big fan of museums. Honestly, I'm not a big fan of museums.

嗯,老实说,我不太喜欢博物馆。老实说,我不太喜欢博物馆。

So, notice, if the answers are "no", we can say "well, to be honest" or "honestly". Notice the rising falling intonation: Honestly.

注意,如果回答是“不”,那么我们可以说“老实说”或者“讲真”。注意先上升后下降的语调:老实说。

If the answer is a positive: Wow! Without a doubt, I'm a big fan of museums.

如果回答是肯定的:哇!毫无疑问,我超喜欢博物馆。

Absolutely! I'm really into museums. Notice we can say "yes" or "wow, without a doubt", "without a doubt" or "absolutely" with quite a bit of emotion as well, right, "absolutely".

当然!我非常喜欢博物馆。注意,我们可以说“是的”或“哇,毫无疑问”,“毫无疑问”,“当然”,加一点感情进去,“当然了”。

Show the emotion on your face, "absolutely". It's nice to give some feeling in our IELTS speaking.

脸部表现一点感情,“当然了”。在雅思口语中流露一点感情是很好的。

And here's another question: Do you think history is important?

下面是另一个问题:你认为历史重要吗?

Now, if your answer is "yes, it's very important", you could say: Yeah, I reckon it's essential.

如果你的回答是“是的,它非常重要”,那么你可以说:对,我认为它是必不可少的。

For sure, in my eyes, it's really important because without it. . . Yep, I'd say it's pretty important, because without it. . .

当然,在我眼里,它非常重要,因为如果没有它......是的,我觉得它非常重要,因为如果没有它......

Yeah, I reckon. . . "I reckon" means "I think".

是的,我认为......“I reckon”意思是“我认为”。

It's more colloquial and really nice to use in IELTS speaking. You could also say "for sure", "in my eyes", "in my view", all of these are good.

它更口语化,在雅思口语中使用非常好。你也可以说“当然”、“在我眼里”、“在我看来”,所有这些都是好的。

You can say "yes/yeah/yep", all of these are natural English and really good to use. "I would say" or "I'd say"?

你可以说“yes/yeah/yep”,所有这些都是非常自然的英语,很好用。“I would say”还是“I'd say”?

I advise you make the contraction "I would say" "I'd say", "I'd", "I'd say". If you're not sure if it's important or not, you may be using language like "I guess so" or "I suppose so".

我建议你用“I would say”的缩写“I'd say”,“I'd say”。如果你不确定某事是否重要,你可以用“I guess so”或“I suppose so”之类的字眼。

Notice how you can mix them up, right? I guess so. I suppose history gives us a sense of identity and. . .

你可以一起用。我想是这样。我想历史给了我们一种认同感……

I suppose so. I guess history shapes our present-day culture and identity. . . I guess so. I suppose history. . .

我想是这样。我想历史塑造了我们现在的文化和身份……我想是这样。我想历史……

I suppose so. I guess history is important. And notice the number one mistake.

我想是这样。我认为历史很重要。注意第一个错误。

The most common mistake is: "Do you think history is important?" - "I think yes." That's not right, right?

最常见的错误是:“你认为历史重要吗?” - “我觉得是。”这样不对。

You have to say this: I think so. Yes, it is important.

你得这样说:我认为是这样。是的,它很重要。

So, be careful with that one. Let's move on.

要小心这个错误。我们继续。

Let's look now how we can use some nice fillers and connectors to begin an answer. Here's one question.

现在让我们看看如何使用一些好的填充词和关联词来开始作答。下面是问题。

What are the advantages of traveling by plane? Well, first of all, it's fast and really convenient.

坐飞机旅行有什么好处?嗯,首先,它很快速而且非常方便。

"First of all" make sense, right? Logical. Notice we often say "well, first", "well, first of all" and you're connecting "first of all".

“首先”有道理,对吧?合乎逻辑。注意,我们经常说“嗯,第一”,“嗯,首先”,你连接了“首先”。

Well to kick off, it's faster than most other means of transport. "Well to kick off", to kick off, it's like the football match, right, to begin, to "kick off" is just to begin, "well, to begin" or "to kick off".

首先,它比其他交通工具都快。“Well to kick off”,就像足球比赛,对,开始,“kick off”就是开始,“well, to begin”或“to kick off”。

For starters, it's faster than most other means of transport. Now, that's a really nice colloquial filler, "for starters".

首先,它比大多数其他交通工具都要快。这是一个很好的口语填充词,“for starters”。

Often, we use it for the first course of a meal, but also when you're talking to say "to begin with", "for starters", nice. Let's move on now and look at the same question — the advantages of flying — and how we can add information.

通常,我们在一顿饭的第一道菜上用这个词,但是当你说话的时候,也可以说“for starters”表示“首先”,很好。现在让我们继续讨论同一个问题——飞行的优势——以及如何增加信息。

What fillers can we use here? Well, we can use another thing is "on top of that", "as far as I know", "to my knowledge", all of these are great.

这里我们可以用什么填充词呢?我们还可以用“此外”、“据我所知”、“据我了解”,所有这些都很好。

Let's see these in action. Another thing is, apparently, flying is the safest way to travel.

我们看看它们的应用。而且,显然,飞行是最安全的旅行方式。

On top of that, flying is said to be the safest way to travel. As far as I know, flying is the safest way to travel.

此外,飞行据说是最安全的旅行方式。据我所知,飞行据说是最安全的旅行方式。

To my knowledge, flying is the safest way to travel. And now for emphasizing, there are different ways we can emphasize.

据我了解,飞行据说是最安全的旅行方式。现在我们可以用不同的方式来强调。

A nice one, rather complex but higher level is this one: "I'd go as far as to say", which means I would add even more emphatically, "I would go as far as here to say something". Let's have a look.

一个更好的,相当复杂但更高级的填充用语是:I'd go as far as to say,意思是我甚至更强调,“我甚至会说”。我们来看看。

I'd go as far as saying flying is the best way to travel hands down. "Hands down" is a lovely expression. "Hands down" just means "for sure", "undoubtedly".

我甚至会说,坐飞机无疑是最好的旅行方式。“Hands down”是一个很可爱的表达。“Hands down”的意思是“肯定的”、“无疑的”。

Make notes, start practicing it.?We can also use "actually", "as a matter of fact", "in fact" and "here's the thing".

做好笔记,开始练习它。我们也可以用"actually", "as a matter of fact", "in fact"和"here's the thing"。

Notice the intonation is really important. "Actually" usually has that falling and rising information and that "mm" indicates you're going to carry on.

注意,语调非常重要。“Actually”通常有下降和上升的语调,而“mm”则表示你会继续说下去。

Actually, I think this. Actually flying is the safest way to travel. Let's have a look at these in action.

实际上,我想是这样。其实飞行是最安全的旅行方式。我们看看这些词的应用。

Actually, flying is the safest way to travel. As a matter of fact, flying is the safest way to travel.

实际上,坐飞机是最安全的旅行方式。事实上,乘飞机是最安全的旅行方式。

In fact, flying is the safest way to travel. And here's the thing, apparently, flying is the safest way to travel.

事实上,乘飞机是最安全的旅行方式。显然,坐飞机是最安全的旅行方式。

Now, when we move to giving examples. . . . . . there are many ways we can do it.

我们继续举例子的时候......我们可以用很多表达。

The common ones: "for example", "for instance", "take me as an example", "take me as an example". Let's see some of these in action.

常见的有:“for example”、“for instance”、“take me as an example”。我们看看它们的应用。

For instance, to my knowledge, Quantas airlines has never had a fatal accident, ever? You can see this with Quantas airlines, as far as I know, they've never had a fatal accident, ever?

比如,据我所知,Quantas 航空从来没有发生过致命事故,是吗?你可以从 Quantas 航空公司看到这一点,据我所知,他们从来没有发生过致命事故,是吗?

I love that last one: You can see this with Samsung; you can see this with Apple. So, whichever your example is, it's a really nice smooth natural way to give an example.

我喜欢后面那个:你可以从三星看到这一点;你可以从苹果看到这一点。无论你举的例子是什么,这都是一个很好的,很自然的举例方式。

Let's move on. Now, a part 3 question is often why does some people do this.

我们继续。第三部分的问题是为什么有些人会这样做。

Now, this is a difficult question because it's very open and often we want to clarify what we mean or what we're going to talk about. And one of the great strategies in part three with the "why do some people. . . ?" question is to break it down to look at different kinds of people, right?

这是一个很难回答的问题,因为这是一个非常开放的问题,我们经常想弄清楚我们的意思或者我们将要谈论什么。在第三部分“为什么有些人……”的问题中,一个很好的策略就是把它分解成不同类型的人。

We can talk about young people, parents, old people, workers, unemployed. Break it down.

我们可以谈论年轻人,父母,老人,工人,失业者。分解它。

And so to do that, we use very simple clarifying techniques. My favourite is this one:

为此,我们使用非常简单的说明技巧。我最喜欢这个:

If we're talking about young people, I reckon they move to the city in search of better job opportunities. Did you get that?

如果我们谈论的是年轻人,我想他们搬到城市是为了寻找更好的工作机会。懂了吗?

If we're talking about. . . if we are talking about something or someone, if we're talking about. . . great. Here's another example.

如果我们说的是......如果我们说的是某事或某人,如果我们说的是......很好。下面是另一个例子。

If we're talking about parents, I suppose they want a better school for their children. Let's look now at contrasting, contrasting.

如果我们说的是家长,我想他们是想让孩子上更好的学校。现在让我们看看对比,对比。

Similar to comparing, but where we look at A, and then contrast it with B. So often, we use the word "but".

类似于比较,但是我们看 A,然后把它和 B 对比。我们经常会用单词“but”。

"There is this, but there's that". "But" is the most overused connector.

“这样,但是也那样。”“But”是滥用得最多的关联词。

What other ways we can use to express that? Well, "however", "that said", "mind you", "at the same time".

我们还能用其他哪些词呢?嗯,“however”、“that said”、“mind you”、“at the same time”。

And notice with most of these, we have that falling rising intonation: that said, mind you. And it just indicates that we're going to carry on speaking.

注意,大多数这些词都是先降后升的语调:that said,mind you。表明我们还要说下去。

It's great natural intonation, lovely connector. Let's see in practice.

这是非常自然的语调,非常好的关联词。我们看看它们的应用。

The same question as before: Why do some people choose to live in the city rather than in the countryside? If we're talking about young people, I reckon they move to the city in search of better job opportunities.

还是之前的问题:为什么有些人选择住在城市而不是农村?如果我们谈论的是年轻人,我想他们搬到城市是为了寻找更好的工作机会。

That said, many people who work remotely choose to live in the suburbs or even the countryside. If we're talking about parents, I suppose they want a better school for their kids.

尽管如此,许多远程办公的人还是选择住在郊区甚至乡村。如果我们说的是家长,我想他们是想让孩子上更好的学校。

Mind you, nowadays, there are lots of good quality schools to be found in rural areas too. Can you see how that works?

但是,现在农村地区也有很多优质学校。明白它们的作用了吗?

Brilliant! Start practicing. And let's wind up with concluding, ha, concluding.

太好了!开始练习吧。我们最后来说说总结,总结。

There are different ways to conclude: finally, to summarize, in conclusion. I think some of the more natural ones are these: in a nutshell, overall, all in all, at the end of the day.

表示总结有不同的词:finally、to summarize、in conclusion。我认为一些比较自然的说法是:in a nutshell、overall、all in all、at the end of the day。

So again, let's have a look at these in action. In a nutshell, I think people move to the city because it offers more opportunities.

我们再来看看它们的应用。简而言之,我认为人们搬到城市是因为城市提供了更多的机会。

Overall, I think people move to the city because it offers more opportunities. All in all, I'd say people move to the city because it offers more opportunities.

总的来说,我认为人们搬到城市是因为城市提供了更多的机会。总之,我认为人们搬到城市是因为城市提供了更多的机会。

At the end of the day, I suppose people move to the city because it offers more opportunities. Guys, that's it. A whole bunch of fillers that will help you improve your fluency and give cracking answers in your IELTS speaking for part 1 and part 3.

总之,我认为人们搬到城市是因为城市提供了更多的机会。伙计们,就是这样了。很多可以帮助你提高流利程度的填充词,帮助你们在雅思口语第一部分和第三部分中作出精彩的回答。

I hope this has helped. Just to remind you, come along to Facebook, the ieltsspeakingsuccess, Facebook page, Tuesday and Thursday 10 o'clock Spanish time.

我希望有帮助。提醒一下,去 Facebook,ieltsspeakingsuccess,Facebook 页面看看吧,西班牙时间周二和周四10点。

Free lessons! It's brilliant! We have a ball! We have a whale of a time!

免费课程!非常棒!我们愉快玩耍!我们一起蹦迪!

Do come and join us! And if you're looking for a more in-depth online course, check out my course on udemy: IELTS Speaking Success; Get a Band 7+.

来加入我们吧!如果你想找一个更深入的在线课程,可以在 udemy 上查看我的课程:IELTS Speaking Success; Get a Band 7+。

Go ahead! Go and get it! Get a band 7+! Please share this video with your friends, subscribe, turn on notifications.

去吧!去上我的课吧!拿七分以上!请把这个视频分享给你的朋友,订阅,打开通知功能。

I really appreciate you following me and thank you very much and I can't wait to see you soon. Take care, everybody. Byebye.

我真的很感谢你的关注,非常感谢,我迫不及待地想尽快见到你。大家保重,拜拜。

语常用词疑难用法-107:as(续6)

(7) as如果引入表示“正当...之时”的时间状语从句,此时从句中的谓语动词即使用现在或一般过去时,不用进行式,也仍然表示无限延续的动作,不是表示瞬时完成的动作。用第二类动词(“活动动词”)时,固然表示正在过程中,没有终点可言。即使用第三类动词(“趋成动词”)时,本来通常用一般过去时这类动词表示动作已经到达了终点,但是在as引入的时间状语从句中却是例外,所表示的是动作仍在进行过程中。

Even as the ink on the treaty dried, a final struggle was taking shape over the vast lands of the West. (American History Made Simple, p. 33) 条约墨汁未干,争夺西部大片土地的一场最后的战斗就已经在开场(注意:这里的dried不是“干了”,而是“正在逐渐干着但未全干”,as表明了过程在进行中,否定了过程的结束)。

The clack of high heels can be heard as she crosses the yard. 她穿过院子时,可以听到高跟鞋的咯咯声。

On sidewalks a tide of hurrying inbound office workers swirled around Sam and Celia as they strolled. 萨姆和塞莉娅在人行道上漫步时,被潮水般的一大堆往里走的办公室工作人员团团卷在中间。

Antoine Ghanem... died when a bomb in a parked car went of as he drove by in a Christian suburb of the capital. (The New York Times, Sept. 20, 2007, A1) 加涅姆正在驱车经过首都一个基督教郊区时,一辆停泊的汽车里炸弹爆炸,他因而丧生。

They had encountered each other in a corridor where others were passing as they talked. 他们是在一条走廊上碰面的,交谈时别的人就从他们身边走过。

As FDA's examination proceeded, scientists from the pharmaceutical companies would be called in, perhaps to explain some of the submitted material or to add even more. 当食品药物管理局的审查在进行中时,医药公司的一些科学家往往被喊去,也许是要对原先提供的材料作出说明,或者再补充更多的材料。

因此,as引入的时间状语从句(谓语动词用一般时),往往相当于中文的“随着”(这是一个很简单的用法,不必麻烦去找复杂的英语说法来翻译“随着”)。

As time went on, the prediction of Dr. Gould seemed increasingly and sadly to be true. 随着时间推移,古尔德博士的不祥预言就越来越显得不幸而言中。

As the world warms, the United States will face more severe thunderstorms with deadly lightning, damaging hail and the potential for tornadoes. (AP, Aug. 30, 2007) 随着地球变暖,美国将遇到更多的严重雷阵雨,带有致命的闪电、破坏性的冰雹以及潜在的龙卷风。

As his computer expertise grew, he began making Internet connection all over the world. 随着他的电脑技能日益提高,他就开始通过互联网联上了全世界。

Therefore, as months went by with no decision made, his frustration grew. 因此,随着时间一个一个月过去,事情悬而未决,他就越来越心焦如焚。