【问题标题】:wpf theme changed my aligmnentwpf 主题改变了我的对齐方式
【发布时间】:2009-10-12 09:38:53
【问题描述】:

我将 BureauBlue.xaml 主题应用到我的应用程序中,但它破坏了我的所有对齐方式。有什么解决方案可以应用主题而不破坏我的对齐方式???

将您的主题放在“主题”文件夹中。

应用程序
 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 x:Class="WpfApplication4.App"
 StartupUri="MainWindow.xaml">
 应用程序.资源>

  资源词典>
   ResourceDictionary.MergedDictionaries>
    ResourceDictionary Source="Themes/BureauBlue.xaml"/>
   /ResourceDictionary.MergedDictionaries>
  /资源字典>
 /应用程序.资源>
/应用>

我刚刚删除了我的代码的起始括号,因为它没有显示我的代码。

【问题讨论】:

    标签: wpf alignment themes


    【解决方案1】:

    转到 App.xaml 并在那里粘贴行,您将使用非常接近 Windows7 的 Vista 主题,用于进度条、复选框、菜单、配给按钮、滚动条等,但您不会有玻璃外观。

    <Application.Resources>
        <ResourceDictionary Source="/PresentationFramework.Aero, Version=3.0.0.0,
        Culture=neutral, PublicKeyToken=31bf3856ad364e35,
        ProcessorArchitecture=MSIL;component/themes/aero.normalcolor.xaml" />
    </Application.Resources>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-06-25
      相关资源
      最近更新 更多