如何将我的静态资源样式文件值分配给DiscreteObjectKeyFrame? [英] How can I assign my static Resource style file value to DiscreteObjectKeyFrame?

查看:73
本文介绍了如何将我的静态资源样式文件值分配给DiscreteObjectKeyFrame?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


如何将我的静态资源样式文件值分配给DiscreteObjectKeyFrame?

How can I assign my static Resource style file value to DiscreteObjectKeyFrame?


我在我的资源中定义了以下值文件:

I have defined following value in my Resource file:


< SolidColorBrush x:Key =" navMenuItemForeground"颜色="#FFFFFF" />

  &NBSP; < FontWeight x:Key =" navMenuItemFontWight"> SemiBold< / FontWeight>

  &NBSP; < FontStyle x:Key =" navMenuItemFontStyle"> Normal< / FontStyle>

  &NBSP; < x:Double x:Key =" navMenuItemFontSize" > 14< / x:Double>

  &NBSP; < x:Double x:Key =" navMenuItemBorderThickness"> 0< / x:Double>

  &NBSP; < FontFamily x:Key =" navMenuItemFontFamily"> OpenSans< / FontFamily>

  &NBSP; < SolidColorBrush x:Key =" navMenuItemBackground"颜色="透明" />

  &NBSP; < SolidColorBrush x:Key =" navMenuItemFocusedColor" Color ="#ff1d10" />

  &NBSP; < FontWeight x:Key =" navMenuItemFocusedFontWeight"> Bold< / FontWeight>

  &NBSP; < FontStyle x:Key =" navMenuItemFocusedFontStyle"> Normal< / FontStyle>

  &NBSP; < x:Double x:Key =" navMenuItemFocusedFontSize" > 14< / x:Double>

  &NBSP; < x:Double x:Key =" navMenuItemFocusedBorderThickness"> 0< / x:Double>

  &NBSP; < SolidColorBrush x:Key =" navMenuItemFocusedBackground"颜色="透明" />

<SolidColorBrush x:Key="navMenuItemForeground" Color="#ffffff" />
    <FontWeight x:Key="navMenuItemFontWight">SemiBold</FontWeight>
    <FontStyle x:Key="navMenuItemFontStyle">Normal</FontStyle>
    <x:Double x:Key="navMenuItemFontSize" >14</x:Double>
    <x:Double x:Key="navMenuItemBorderThickness">0</x:Double>
    <FontFamily x:Key="navMenuItemFontFamily">OpenSans</FontFamily>
    <SolidColorBrush x:Key="navMenuItemBackground" Color="Transparent" />
    <SolidColorBrush x:Key="navMenuItemFocusedColor" Color="#ff1d10"/>
    <FontWeight x:Key="navMenuItemFocusedFontWeight">Bold</FontWeight>
    <FontStyle x:Key="navMenuItemFocusedFontStyle">Normal</FontStyle>
    <x:Double x:Key="navMenuItemFocusedFontSize" >14</x:Double>
    <x:Double x:Key="navMenuItemFocusedBorderThickness">0</x:Double>
    <SolidColorBrush x:Key="navMenuItemFocusedBackground" Color="Transparent" />



现在我想将这些值分配给visualState storyboard中的DiscreteObjectKeyFrame定义按钮的自定义样式。但它不接受我上面定义的值。

Now I want to assign these values to DiscreteObjectKeyFrame in visualState storyboard while defining my custom style for button. But it's not accepting my above defined values.

推荐答案

您好,

欢迎来到开发通用Windows应用程序
论坛!

请阅读粘贴帖子,尤其是  发布指南:主题行
代码
   Windows 10 SDK和工具的已知问题 ,
并且不要忘记在你的问题中添加标签。

Please read the sticky posts, especially the Guide to posting: subject line tags and Known Issues for Windows 10 SDK and Tools , and don't forget add tag to your question.

据我所知,你有单独的r你的应用程序中的esources字典文件,并想使用?您应该合并定义样式的字典whit控制字典。或者,您可以将其与整个应用资源合并,并且可以访问它。
来自任何地方  合并资源字典

As I understand you have separate resources dictionary file in your app and want to use?. You should merge that dictionary whit control dictionary where your style is defined. Or you can merge it with entire  app  resources an the it will be accessible form any where Merged resource dictionaries


这篇关于如何将我的静态资源样式文件值分配给DiscreteObjectKeyFrame?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆