首页 > 其他分享 >WPF Application.Current.Properties[key]=value

WPF Application.Current.Properties[key]=value

时间:2024-09-11 14:51:55浏览次数:1  
标签:Windows System value Current Application using Properties

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace WpfApp357
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            Application.Current.Properties["test"] = "TESTApplication";
            MessageBox.Show(Application.Current.Properties["test"] as string);
        }
    }
}

 

 

 

标签:Windows,System,value,Current,Application,using,Properties
From: https://www.cnblogs.com/Fred1987/p/18408226

相关文章

  • WebSphere Application Server在centos7下的安装
    需要先下载ibm的官方安装器InstallationManager1.下载InstallationManager1.9.0下载地址:InstallationManagerandPackagingUtilitydownloaddocuments选择1.9.0版本点击下载点击之后往下滑,点击对应版本的FC。勾选第一个,点击继续直接在浏览器下载参考这篇博客,......
  • COMP3013 Mobile Applications
    COMP3013MobileApplicationsDevelopmentSpring2024Assignment1MenUWSDue:8thSeptember2024(Studentsmustdemonstratetheirassignmentsatthetutorialtimeinweek9).AssignmentDetailsForthisassignment,youarerequiredtocreateasimple......
  • Nacos bootstrap配置文件中关于spring.application.name命名注意事项
    在写配置文件时,把bootstrap文件中的spring.application.name命名时单词之间使用了下划线来连接,结果在启动nacos时报错找不到配置文件一直请求的是本地的nacos,最后发现是在spring.application.name命名时如果使用连接符时必须使用中间的连接符。在官方文档中是这样说的:spring.ap......
  • SciTech-Mathmatics-Probability+Statistics-Applications : Probability&Sampling :
    SciTech-Mathmatics-Probability+Statistics-Applications:Probability&Sampling:SamplingDistribution+CentralLimitTheoremSamplingDistribution+CentralLimitTheoremBYZACHBOBBITTPOSTEDONOCTOBER8,2018Imaginethereexistsapopulationof1......
  • C# Console application start wpf window via Application, Encapsulates a Windows
    usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.Threading.Tasks;usingSystem.Windows;usingSystem.Windows.Controls;usingSystem.Windows.Data;usingSystem.Windows.Media.Imaging;namespaceConsoleApp73......
  • C# console application main method new and start wpf window application
    1.NewConsoleapplication;2.Addreference,PresentationCoreandWindowsBase3.usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.Threading.Tasks;usingSystem.Windows;usingSystem.Windows.Controls;using......
  • [Java并发]Concurrenthashmap的size()
    1.一致性定义关于一致性的定义,大概如下:一致性(Consistency)是指多副本(Replications)问题中的数据一致性。可以分为强一致性、顺序一致性与弱一致性。1.1强一致性(StrictConsistency)强一致性也被可以被称做:原子一致性(AtomicConsistency)线性一致性(LinearizableConsistency)要......
  • @ConfigurationProperties VS @Value,你觉得哪个更好用
    文章目录使用测试@ConfigurationProperties和@Value区别复杂类型封装松散绑定元数据支持SpEL表达式JSR-303数据校验总结实际工作中,我们经常会看到或用到@ConfigurationProperties和@Value注解来注入自定义配置属性,那它们之间有什么不同呢?本文将从松散绑定、参数校验、SpEL表达......
  • Java中的集合框架深度解析:从ArrayList到ConcurrentHashMap的性能考量
    Java中的集合框架深度解析:从ArrayList到ConcurrentHashMap的性能考量大家好,我是微赚淘客返利系统3.0的小编,是个冬天不穿秋裤,天冷也要风度的程序猿!Java的集合框架为开发者提供了多种数据结构,每种数据结构都有其特定的使用场景和性能特征。本文将深度解析Java中的主要集合类,从Array......
  • Applications of UDTL to Intelligent Fault Diagnosis: A Survey and Comparative St
    文章目录摘要一、引言二、背景和定义A.UDTL定义B.基于UDTL的IFD分类C.基于UDTL的IFD动机D.主干结构三、LABEL-CONSISTENTUDTLA.基于网络的UDTLB.基于实例化的UDTLC.基于映射的UDTLD.基于对抗性的IFD四.LABEL-INCONSISTENTUDTLA.PartialUDTLB.OpenSetUDTLC.Uni......