PackageとPackageId
WindowsRuntimeでは自身のパッケージの情報をPackageクラスに所有しています。
PackageクラスのstaticメンバにCurrentというメンバがあり、その中にPackageクラスのインスタンスが入っています。
また、PackageクラスのIdメンバはPackageIdというクラスで、パッケージの名前や様々なIDが入っています。
var pack = Package.Current; Debug.WriteLine("Description=" + pack.Description); Debug.WriteLine("DisplayName=" + pack.DisplayName); Debug.WriteLine("InstalledLocation=" + pack.InstalledLocation); Debug.WriteLine("IsBundle=" + pack.IsBundle); Debug.WriteLine("IsDevelopmentMode=" + pack.IsDevelopmentMode); Debug.WriteLine("IsFramework=" + pack.IsFramework); Debug.WriteLine("IsResourcePackage=" + pack.IsResourcePackage); Debug.WriteLine("Logo=" + pack.Logo.AbsolutePath); Debug.WriteLine("PublisherDisplayName=" + pack.PublisherDisplayName); var packId = pack.Id; Debug.WriteLine("Version={0}.{1}.{2}.{3}",packId.Version.Major,packId.Version.Minor,packId.Version.Build,packId.Version.Revision); Debug.WriteLine("Name=" + packId.Name); Debug.WriteLine("FullName=" + packId.FullName); Debug.WriteLine("FamilyName=" + packId.FamilyName); Debug.WriteLine("Publisher=" + packId.Publisher); Debug.WriteLine("ResourceId=" + packId.ResourceId);