相关疑难解决方法(0)

WPF:未找到Microsoft_Windows_Themes

我在WPF应用程序中收到此错误:

找不到类型"Microsoft_Windows_Themes:ScrollChrome".验证您是否缺少程序集引用,并且已构建所有引用的程序集.

任何的想法?

wpf themes

20
推荐指数
1
解决办法
2万
查看次数

更改FlowDirection时,CheckBox会镜像

操作系统:Microsoft Windows 8.1开发应用程序:Microsoft Visual Studio 2013(WPF App开发)

我已经从Windows 7迁移到Windows 8.1,现在我在VS2012开发的旧应用程序有一种奇怪的方式.因为我的语言是从右到左,我使用RightToLeftFlowDirection.它工作正常,因为所有文本都显示在左侧,CheckBox但现在刻度符号的CheckBox镜像如下:

在此输入图像描述

即使是从右到左的语言,刻度线也不正确.这是因为操作系统或VS2013,我该如何解决?我需要创建一个模板吗?谢谢.

wpf

6
推荐指数
2
解决办法
2276
查看次数

WPF按钮图标被镜像,为什么?

在定义图像时,此按钮看起来很好(参见屏幕截图),如下所示.请注意,带有字母'T'的盾形图标可以正确显示.

<Button Command="w:MainWindow.BrowseTorrentSite">
    <StackPanel>
        <Image Source="../icons/kickasstorrent.png" />
    </StackPanel>
</Button>
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

当我想依赖按钮启用状态时,图标会被镜像.

<StackPanel 
      Orientation="Horizontal" 
      FlowDirection="RightToLeft">
        <Button 
            x:Name="KatButton" 
            Command="w:MainWindow.BrowseTorrentSite">
            <StackPanel>
                <Image>
                    <Image.Style>
                        <Style TargetType="Image">
                            <Style.Triggers>
                                <DataTrigger
                                    Binding="{Binding Path=IsEnabled, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Button}}" 
                                    Value="True">

                                    <Setter Property="Source" Value="../icons/kickasstorrent.png" />
                                </DataTrigger>
                                <DataTrigger 
                                    Binding="{Binding Path=IsEnabled, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Button}}" 
                                    Value="False">

                                    <Setter Property="Source" Value="../icons/kickasstorrent_disabled.png" />
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </Image.Style>
                </Image>
            </StackPanel>
        </Button>
</StackPanel>
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

请注意,带有字母'T'的盾形图标现在已镜像.

负责镜像图标的是什么?

如果有人提供以任何可能的方式调试这个的提示,请随意指出我正确的方向!

wpf icons xaml button

4
推荐指数
1
解决办法
911
查看次数

标签 统计

wpf ×3

button ×1

icons ×1

themes ×1

xaml ×1