小编Ast*_*her的帖子

在UWP中获取重音颜色的变化

我正在尝试使用主题资源SystemAccentColorLight1 SystemAccentColorLight2获得更轻的强调色调变化......

我收到此异常:找不到与此错误代码关联的文本.

找不到名称/密钥SystemAccentColorLight1的资源[行:15位置:19]

<Grid Background="{ThemeResource ResourceKey= SystemAccentColorLight1}"  HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Padding="5">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="60" />
                <ColumnDefinition />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <Image Source="{Binding Path=Owner.ProfileImage}" Width="50" Height="50" Grid.Column="0" Grid.Row="0" Grid.RowSpan="2"></Image>
            <TextBlock Text="{Binding Title}" FontSize="12" TextWrapping="WrapWholeWords" FontWeight="SemiBold" Grid.Column="1" Grid.ColumnSpan="2"/>
            <TextBlock Text="{Binding Path=Owner.DisplayName}" VerticalAlignment="Bottom" HorizontalAlignment="Left" FontSize="9" Grid.Column="1" Grid.Row="1" />
        </Grid>
Run Code Online (Sandbox Code Playgroud)

https://msdn.microsoft.com/windows/uwp/style/color?f=255&MSPPError=-2147217396

在XAML中,主要重音颜色作为名为SystemAccentColor的主题资源公开.阴影可用作SystemAccentColorLight3,SystemAccentColorLight2,SystemAccentColorLight1,SystemAccentColorDark1,SystemAccentColorDark2和SystemAccentColorDark3.也可以通过UISettings.GetColorValue和UIColorType枚举以编程方式获得.

xaml win-universal-app

5
推荐指数
1
解决办法
874
查看次数

检查nodejs中的继承

在nodejs中检查继承的最佳方法是什么?

我试图instanceof在另一个继承该模块的类的模块的实例中使用.

档案a.js

    class A{

    }

    class B extends A{

    }

    var b = new B();

    b instanceof A ///this work
    global.c instanceof A //this doesn't work

    module.exports = A;
Run Code Online (Sandbox Code Playgroud)

文件c.js

var A = require("./a");

class C extends A{

}

global.c = new C();
Run Code Online (Sandbox Code Playgroud)

inheritance node.js ecmascript-6

5
推荐指数
1
解决办法
432
查看次数