【问题标题】:Windows 7 like form style in c#(WPF)c#(WPF) 中类似于 Windows 7 的表单样式
【发布时间】:2010-05-10 08:49:59
【问题描述】:

hai 我正在用 c#(WPF) 开发一个应用程序。当我在 windows xp 中运行应用程序时,我想显示 windows 就像我们在 windows 7 或 vista 中的外观一样。
我正在使用带有 c# 的 WPF。可能吗。我该怎么办

【问题讨论】:

  • 为什么?当应用程序这样做时,我讨厌它。坚持使用用户理解的可预测 UI - 他当前的操作系统使用的 UI。
  • 是的,马特,我太讨厌了。但是客户要求,我该怎么办.. :)
  • 您想要透明度等?如果可能的话,我想这将是很多工作。
  • 是的,windows7 类似标题栏,最小化,关闭按钮之类的,例如,如果你在 windows xp 中打开 skype,它看起来就像 windows7 默认的表单样式,就像那样。它在 Skype 表单设计中是如何工作的。???

标签: c# wpf


【解决方案1】:

我知道已经晚了,但我在这里发布一些可以帮助其他人的内容。

这可以是一个开始:

<Window x:Class="WpfApplication1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525" AllowsTransparency="True" WindowStyle="None" Background="Transparent" WindowStartupLocation="CenterScreen">
    <Grid>
        <Rectangle Name="rectangle1" Stroke="#111111" Fill="#dd334455" RadiusX="5" RadiusY="5" />
        <Border BorderThickness="1" Margin="1" BorderBrush="#ddffffff" CornerRadius="5" />
        <Label Content="Window title">
            <Label.Effect>
                <DropShadowEffect ShadowDepth="0" Color="White" BlurRadius="10" />
            </Label.Effect>
        </Label>
        <Grid Margin="8,25,8,8" Background="White">
            <Label Content="Controls here" />
        </Grid>
        <Border Margin="6,23,6,6" BorderThickness="1" BorderBrush="#99ffffff" CornerRadius="1" />
        <Border Margin="7,24,7,7" BorderThickness="1" BorderBrush="#333333" CornerRadius="1" />
    </Grid>
</Window>

【讨论】:

    猜你喜欢
    • 2011-02-08
    • 2011-05-29
    • 2011-04-01
    • 2011-11-18
    • 1970-01-01
    • 2011-07-26
    • 1970-01-01
    • 2011-08-27
    相关资源
    最近更新 更多