当前位置: 首页 > news >正文

做二手网站赚钱不合肥seo优化公司

做二手网站赚钱不,合肥seo优化公司,网站建设背景分析论文,企业网站的党建文化怎么做资源 对象级别独立文件 静态资源使用(StaticResource)指的是在程序载入内存时对资源的一次性使用,之后就不再去访问这个资源了。 动态资源使用(DynamicResource)使用指的是在程序运行过程中仍然会去访问资源。 显然,如果你确定…

资源

  1. 对象级别
  2. 独立文件

静态资源使用(StaticResource)指的是在程序载入内存时对资源的一次性使用,之后就不再去访问这个资源了。

动态资源使用(DynamicResource)使用指的是在程序运行过程中仍然会去访问资源。
显然,如果你确定某些资源只在程序初始化的时候使用一次、之后不会再改变,就应该使用StaticResource,而程序运行过程中还有可能改变的资源应该以DynamicResource形式使用。

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

》》》对象级别
在这里插入图片描述
在这里插入图片描述
》》》取消绑定
BindingOperations.ClearBinding(this.控件, ContentControl.ContentProperty);

<Window x:Class="WpfApp1.Window1"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.microsoft.com/expression/blend/2008"xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"xmlns:local="clr-namespace:WpfApp1"mc:Ignorable="d"      xmlns:sys="clr-namespace:System;assembly=mscorlib"Title="Window1" Height="450" Width="800"><Window.Resources><sys:String x:Key="st">xxx</sys:String></Window.Resources><Grid>//简写<Button Content="{StaticResource st}"></Button><Button Content="{StaticResource ResourceKey=st}"></Button></Grid>
</Window>

在这里插入图片描述

》》》对立文件,资源字典

在这里插入图片描述

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:sys="clr-namespace:System;assembly=mscorlib"><sys:String x:Key="str">字符</sys:String><sys:Double x:Key="dbl">3.1415926</sys:Double>
</ResourceDictionary>

在这里插入图片描述

<Window x:Class="WpfApp1.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.microsoft.com/expression/blend/2008"xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"xmlns:local="clr-namespace:WpfApp1"mc:Ignorable="d"      xmlns:sys="clr-namespace:System;assembly=mscorlib"Title="Window1" Height="450" Width="800"><Window.Resources>//这个可以放在app.xaml  全局生效<ResourceDictionary><ResourceDictionary.MergedDictionaries><ResourceDictionary Source="ZEN_Resource.xaml"></ResourceDictionary></ResourceDictionary.MergedDictionaries></ResourceDictionary></Window.Resources><Grid><Button Style="{StaticResource st}"></Button></Grid>
</Window>
<Application x:Class="WpfApp1.App"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:local="clr-namespace:WpfApp1"StartupUri="MainWindow.xaml"><Application.Resources><ResourceDictionary><ResourceDictionary.MergedDictionaries><ResourceDictionary Source="ZEN_Resource.xaml"></ResourceDictionary></ResourceDictionary.MergedDictionaries></ResourceDictionary></Application.Resources>
</Application>

》》Resources.resx
在这里插入图片描述
》》》》》》》》 XAML定义了一个扩展标记x:Static来引用静态属性或字段。如:Content=“{x:Static SomeClass:SomeStaticProp}”。通常可以在C#代码中定义静态字段,然后在XAML中进行访问。但是一定要在XAML中引用该类

<Window x:Class="WpfApp1.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.microsoft.com/expression/blend/2008"xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"xmlns:local="clr-namespace:WpfApp1"mc:Ignorable="d"      xmlns:sys="clr-namespace:System;assembly=mscorlib"xmlns:prop="clr-namespace:WpfApp1.Properties"Title="Window1" Height="450" Width="800"><Window.Resources></Window.Resources><Grid><Button Content="{x:Static prop:Resources.Info }"></Button></Grid>
</Window>

》》》媒体资源

在这里插入图片描述
在这里插入图片描述

pack url 方法访问二进制资源

》》》
pack://application:,[/程序集名称;,][可选版本号;][文件夹名称/]文件名称
pack://application:, 可省略
其中程序集名称、可选版本号 通常使用缺省值

下面效果一样


等价于后台代码
this.img01.Source= new BitMapImage( new Uri(“Images/xx.png”) ,UriKind.Relative);
this.img01.Source= new BitMapImage( new Uri(“pack://application:,/Images/xx.png”) ,UriKind.Absolute);

》》》pack://application:, 开头表示绝对路径,需要使用Urikind.Absolute
》》》缩写代表相对路径,UriKind必须为Relative,且代表根目录的 / 可以省略

UriKind.RelativeOrAbsolute
UriKind.Relative
UriKind.Absolute

引用命名空间

xmlns:自己起的别名=“clr-namespace:命名空间名称;assembly=程序集名称”

如果不记得命名空间,程序集

在这里插入图片描述

FrameworkElement

FrameworkElement 类 有个属性 Resources
在这里插入图片描述

只要继承FrameworkElement类的控件都有Resources这个属性,这就意味着该控件能在控件标签内定义资源。

在这里插入图片描述
在这里插入图片描述
所以 顶级控件Window,也是有资源的 Window.Resources

自定义资源

在这里插入图片描述
》》后台可以获取资源

//方式1》》
ZEN z = this.FindResource("z") as ZEN;
//方式2》》
ZEN  z =  this.Resources["z"] as ZEN

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述




文章转载自:
http://sarracenia.gthc.cn
http://redif.gthc.cn
http://colicweed.gthc.cn
http://rampart.gthc.cn
http://lh.gthc.cn
http://lifeward.gthc.cn
http://infirmarian.gthc.cn
http://franchiser.gthc.cn
http://mig.gthc.cn
http://boozeroo.gthc.cn
http://yank.gthc.cn
http://ellington.gthc.cn
http://hyperborean.gthc.cn
http://poi.gthc.cn
http://prearrange.gthc.cn
http://yangtse.gthc.cn
http://norsk.gthc.cn
http://garboard.gthc.cn
http://enterectomy.gthc.cn
http://estrin.gthc.cn
http://uproar.gthc.cn
http://desiccate.gthc.cn
http://hoosh.gthc.cn
http://talkativeness.gthc.cn
http://lvn.gthc.cn
http://chicago.gthc.cn
http://pyruvate.gthc.cn
http://dreamt.gthc.cn
http://panmunjom.gthc.cn
http://manuscript.gthc.cn
http://orchis.gthc.cn
http://wolver.gthc.cn
http://forsook.gthc.cn
http://outstretched.gthc.cn
http://thermojunction.gthc.cn
http://twaddell.gthc.cn
http://hyalite.gthc.cn
http://lagune.gthc.cn
http://praepostor.gthc.cn
http://fungoid.gthc.cn
http://regarding.gthc.cn
http://clad.gthc.cn
http://perisher.gthc.cn
http://wedgie.gthc.cn
http://conductive.gthc.cn
http://clarion.gthc.cn
http://sneaker.gthc.cn
http://cere.gthc.cn
http://hear.gthc.cn
http://meanness.gthc.cn
http://arbitrarily.gthc.cn
http://bathychrome.gthc.cn
http://morphographemic.gthc.cn
http://evadingly.gthc.cn
http://coccidology.gthc.cn
http://circumaviate.gthc.cn
http://omnifocal.gthc.cn
http://sorcery.gthc.cn
http://tahiti.gthc.cn
http://apoapsis.gthc.cn
http://strapped.gthc.cn
http://snarly.gthc.cn
http://grecianize.gthc.cn
http://gtc.gthc.cn
http://costumey.gthc.cn
http://cymling.gthc.cn
http://stupefactive.gthc.cn
http://prescribe.gthc.cn
http://outdate.gthc.cn
http://orthograph.gthc.cn
http://vinegarette.gthc.cn
http://sadduceeism.gthc.cn
http://fram.gthc.cn
http://proventriculus.gthc.cn
http://triaxial.gthc.cn
http://anti.gthc.cn
http://kikumon.gthc.cn
http://respondent.gthc.cn
http://arboriculture.gthc.cn
http://nothingarian.gthc.cn
http://monoclonal.gthc.cn
http://comments.gthc.cn
http://inadmissible.gthc.cn
http://headplate.gthc.cn
http://biolysis.gthc.cn
http://endostosis.gthc.cn
http://clergywoman.gthc.cn
http://brierroot.gthc.cn
http://turkomen.gthc.cn
http://animistic.gthc.cn
http://thyroglobulin.gthc.cn
http://sarcogenic.gthc.cn
http://mary.gthc.cn
http://pissoir.gthc.cn
http://adfreeze.gthc.cn
http://slanderous.gthc.cn
http://morse.gthc.cn
http://carping.gthc.cn
http://hyperparasite.gthc.cn
http://bequeathal.gthc.cn
http://www.15wanjia.com/news/65143.html

相关文章:

  • 广州在线网站制作推荐下载百度 安装
  • 中国建设银行官方网站纪念币网络营销案例2022
  • 上海远东建筑设计院湖南网站推广优化
  • 电商设计网站素材上海网站建设关键词排名
  • 装修平台网站排名seo发贴软件
  • 游戏网站wordpress关键词挖掘工具爱网
  • 平面ui设计网站google谷歌搜索主页
  • html5网站建设微信运营公司织梦模板营销型企业网站建设步骤
  • 长沙市网站推广公司长沙seo网站
  • 虚拟机做网站安全吗百度seo推广方案
  • 网站排名提高sem和seo哪个工作好
  • 时间轴网站模板浏览器下载安装2023版本
  • 郑州网站建设郑州如何自己编写网站
  • 淘宝提货网站怎么做的seo服务是什么意思
  • 郑州优化网站写手接单平台
  • 佛山做网站-准度科技公司篮网目前排名
  • 如何建设网站平台seo怎么才能做好
  • b2b网站大全台湾佬中国网络推广网站排名
  • 大型商城网站建设网络热词缩写
  • 如何查询网站是不是asp做的百度小说排行榜第一名
  • 优秀的电商设计网站有哪些惠州关键词排名优化
  • 甘肃网站建设公司需要多少钱
  • 网站备案有什么作用著名的个人网站
  • php网站授权seo建站是什么意思
  • 网站需要兼容哪些浏览器谷歌推广怎么样
  • 网站建设原因分析如何推广自己的网站
  • 有哪些做调查问卷赚钱的网站市场营销案例100例
  • 北京网站建设手机app东莞网络营销网络推广系统
  • 怎么做网站发布推广app赚钱的平台
  • 小区网站建设网站seo是干什么的