在XAML中是否存在与div标签等效的标签? [英] Exists an equivalent of the div-tag in XAML?

查看:147
本文介绍了在XAML中是否存在与div标签等效的标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好吗?

情况:具有div和CSS布局的网站.没有桌子(好).
任务:编写使相同网站的xaml代码,其含义看起来相同.
方法:看来HTML代码可以直接翻译成xaml.仅使用在XAML中具有(几乎)同等功能的标记.

但是,

您如何将div标签翻译"为xaml?
您是否认为用C#编写一个customControl确实会造成很大的问题?
------------------------------------
HTML:
...
div class ="example" .../div
...

CSS:
.example {float:left;}
------------------------------------

Greetings

Hi, how are you?

Situation: A website with a div and css based layout. No tables (good).
Task: Write xaml code that makes the same website, meaning looks the same.
Approach: It seems that the HTML code can be translated straight forward into xaml. There are only tags used that have an (almost) equivalent in XAML.

But,

how would you "translate" the div tag into xaml?
Do you think writing a customControl in C# that does the job will be a huge problem?
------------------------------------
HTML:
...
div class="example" ... /div
...

CSS:
.example{float:left;}
------------------------------------

Greetings

推荐答案

WPF中的Grid控件的行为类似于HTML中的Div标签.一切都取决于您想要的特定行为.
The Grid control in WPF acts much like the Div tag in HTML. All depends on what specific behavior you want.


这篇关于在XAML中是否存在与div标签等效的标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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