WPF中应该可以用这个:

rectangle.Style = (Style)FindResource("FormLabelStyle");

但 Win8.1 App是个精简框架,FindResource无效,可以用下面的代替:

rectangle.Style = (Style)Application.Current.Resources["HighLightStyle"];

win8 app code中设置Resources里定义好的Style的更多相关文章

  1. 微信小程序---app.json中设置背景色不生效解决办法

    按照官方文档的说明,backgroundColor应该可以设置窗口的背景色. "window":{ "backgroundTextStyle":"li ...

  2. Visual Studio Code 中实现 C++ 函数定义跳转和代码自动补全功能(25)

    方法1: 1.1 安装插件 C++ Intellisense 名称: C++ Intellisense id: austin.code-gnu-global 说明: C/C++ Intellisens ...

  3. 微信小程序app.js中设置公有变量

    初始化GlobalData 在App.js的最上方可以设置GlobalData的初始值. App({ globalData:{ appid: '1wqas2342dasaqwe232342xxxxxx ...

  4. Visual Studio Code中设置sftp同步代码到服务器

    ## **前言** - 绝对的大佬才会直接在Linux下用vim写代码,我等小白只能通过IDE来了,所以将代码同步到服务器上就很重要了.使用vs code设置好sftp就可以实现这一功能. - 设置之 ...

  5. 微信小程序页面跳转的问题(app.json中设置tarBar后wx.redirectTo和wx.navigateTo均不能实现跳转到指定的页面)

    1.设置的tabBar代码片段: "tabBar": { "list": [ { "pagePath": "pages/homep ...

  6. WP8 学习 在APP.XAML中加入Resources

    <Application.Resources> <local:LocalizedStrings xmlns:local="clr-namespace:test1" ...

  7. 微信小程序首页index.js获取不到app.js中动态设置的globalData的原因以及解决方法

    前段时间开发了一款微信小程序,运行了也几个月了,在index.js中的onLoad生命周期里获取app.js中onLaunch生命周期中在接口里动态设置的globalData一直没有问题,结果昨天就获 ...

  8. asp.net mvc 3 配置全局错误处理 Web.config中设置CustomError

    摘自: http://www.myexception.cn/web/1130191.html asp.net mvc 配置全局异常处理 Web.config中设置CustomError Web.con ...

  9. 如何HTML标签和JS中设置CSS3 var变量

    一.HTML标签中设置CSS变量 如下: <div style="--color: #cd0000;"> <img src="mm.jpg" ...

随机推荐

  1. leetcode492

    public class Solution { public int[] ConstructRectangle(int area) { Dictionary<int, int> dic = ...

  2. 单网卡用双IP上内外网

    网络   2008-09-22 17:42   阅读44   评论1    字号: 大  中  小  PC机同时上内外网一例 一个公司内部,一台pc机在上内网的同时,还要求上外网,如何在一块网卡上实现 ...

  3. 泛型集合与DataSet相互转换

    一.泛型转DataSet /// <summary> /// 泛型集合转换DataSet /// </summary> /// <typeparam name=" ...

  4. vue基础——条件渲染

    一.v-if 1.1.v-if,v-else 在字符串模板中,比如Handlebars,我们得像这样写一个条件块: HTML <!-- Handlebars 模板 --> {{#if ok ...

  5. const 用法

    static NSString * const testString = @"google"; //表示testString这个指针不能被修改,如若对testString赋值则会报 ...

  6. NUMA体系结构介绍

    为什么会有NUMA? 在NUMA架构出现前,CPU欢快的朝着频率越来越高的方向发展.受到物理极限的挑战,又转为核数越来越多的方向发展.如果每个core的工作性质都是share-nothing(类似于m ...

  7. ssh反向连接内网主机

    holer听别人说也挺好用不过本人没试过:https://github.com/Wisdom-Projects/holer 利用autossh建立稳定隧道,前提双方互加公钥信任. # yum inst ...

  8. mongodb first

    use [database] 使用数据库,新增文档后,数据库被自动创建 show dbs 显示所有数据库 db.[document].insert() 插入数据库 例:db.persons.inser ...

  9. Python 遍历文件夹 listdir walk 的区别

    一.一级目录import os path = 'd:\file'; for filename in os.listdir(path): print(os.path.join(path,filename ...

  10. Error: Cannot find a valid baseurl for repo: epel

    修改一下/etc/yum.repos.d/epel.repo文件, enable=1改为enable=0