繁体   English   中英

这个控件叫什么?

[英]What is this control called?

蓝色突出显示的控件的名称是什么?

我想做这个:


(来源: deviantart.net

如果您找到一些指向图书馆的链接,那将会很有帮助。 我已经使用了许多不同的名称(TaskButton/TaskPanel/StackPanel)进行了搜索,但我真的很迷茫。

谢谢。

请注意,第二张图片只是一个概念草图,并不是真正的应用程序。

这很可能是通过组合多个标准 WPF 控件创建的自定义(用户)控件。 它可以很容易地在 WPF 中使用具有各种ImageTextBlockButton元素作为其内容的水平StackPanel构建

我不相信您指向的控件是 .NET 或 WPF 控件。 大多数 Windows 7 用户界面元素仍然是本机 C/C++ 资源。

也就是说,使用 WPF 4.0 通过具有自定义 ItemTemplate 的 ListBox 复制该行为相对容易。 看看这个问题让你开始。

对我来说,它看起来很像一个CommandLink控件,它首先出现在 Vista 中。 它从未公开为用于 Windows Forms 或 WPF 的控件,但此问题包含有关如何使其可供您自己使用的信息:

我想它是一个 WPF 用户控件,专门为此应用程序创建的。 看起来它由一个Image 、一些TextBox控件和一个Button组成,而 Button 又包含一个Image

我不知道该控件是如何被调用的,但我敢打赌它是一个自定义的 windows 表单控件,这是一个让您入门的链接

我知道了。 您可以借助 WPF 中的一个简单按钮来完成此操作。 您必须将另一个按钮和那些图像嵌入到该按钮中。

<Window x:Class="WpfApplication1.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="300" Width="300">
    <Grid>
        <Button Height="38" Margin="12,49,83,0" Name="button1" VerticalAlignment="Top"></Button>
        <Grid Height="32" Margin="113,48,80,0" VerticalAlignment="Top">
            <Grid.RowDefinitions>
                <RowDefinition Height="13*" />
                <RowDefinition Height="19*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="16*" />
                <ColumnDefinition Width="8*" />
                <ColumnDefinition Width="43*" />
                <ColumnDefinition Width="12*" />
                <ColumnDefinition Width="6*" />
            </Grid.ColumnDefinitions>
            <Button Margin="0,6,0,0" Name="button2" HorizontalAlignment="Left" Width="35" Grid.ColumnSpan="3" Grid.RowSpan="2">Button</Button>
            <Button Grid.ColumnSpan="2" Grid.RowSpan="2" Margin="17,6,3,0" Name="button3" Grid.Column="2">Button</Button>
        </Grid>
    </Grid>
</Window>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM