草庐IT

microsoft-metro

全部标签

C# Windows 8 Store (Metro, WinRT) 字节数组到 BitmapImage

我正在开发一个将滤镜应用于图像的Windows8Metro应用程序。我有该应用程序的Web版本并想移植它。但众所周知,WinRT并不具备.NET提供的所有优点:/目前我正在字节数组上应用过滤器,我想保持这种状态,因为它非常快!因此,在过去的几天里,我一直在寻找将StorageFile转换为byte[],然后将byte[]转换为BitmapImage的方法。到目前为止,我已经设法完成了第一个(StorageFile到byte[])。这是我的做法:publicasyncTaskImageFileToByteArray(StorageFilefile){IRandomAccessStream

c# - 使用 : HandleRef or IntPtr (newer source code from Microsoft no longer uses HandleRef) 哪个更好/更安全

例如,在旧的.NETFramework2.0源代码(Windows窗体、VisualStudio2005-Whidbey)中,GetClientRect函数是使用HandleRef定义的:[DllImport(ExternDll.User32,ExactSpelling=true,CharSet=CharSet.Auto)]publicstaticexternboolGetClientRect(HandleRefhWnd,[In,Out]refNativeMethods.RECTrect);在新的WindowsAPI代码包(来自Microsoft,2009/2010)中,使用IntPt

c# - 无法加载文件或程序集 'Microsoft.Practices.EnterpriseLibrary.Common' 或其依赖项之一

我已经用谷歌搜索了这个问题,但找不到问题的解决方案。我的网站引用了DAL(自定义dll),后者引用了企业库数据访问组件。我已经从NuGet包管理器添加了企业库,当我尝试构建网站时弹出此编译错误:Error44Couldnotloadfileorassembly'Microsoft.Practices.EnterpriseLibrary.Common'oroneofitsdependencies.Thelocatedassembly'smanifestdefinitiondoesnotmatchtheassemblyreference我已经尝试在EnterpriseLibrarydll的

c# - Microsoft Sync Framework COM 类错误

我一直在使用“MicrosoftSyncFramework2.1”将两个本地sqlserver2008数据库与一个asp.net项目同步。我的代码:SqlConnectionclientConn=newSqlConnection(@"Server=XXXXXX;UserID=sa;Password=xxxx;Database=ZzzClient");SqlConnectionserverConn=newSqlConnection("Server=XXXXXX;UserID=sa;Password=xxxx;Database=ZzzServer");SyncOrchestratorsyn

c# - 代码隐藏中的 WinRT/Metro 动画

以下代码在Silverlight中运行良好:privatevoidButton_Click_1(objectsender,RoutedEventArgse){Storyboardstoryboard=newStoryboard();DoubleAnimationdoubleAnimation=newDoubleAnimation();doubleAnimation.From=50;doubleAnimation.To=100;doubleAnimation.RepeatBehavior=RepeatBehavior.Forever;doubleAnimation.AutoReverse

c# - 在 .net 中发送 SMTP 电子邮件测试 Microsoft Office 365

我在ExchangeOnline服务上有一个邮件帐户。现在我正在尝试测试我是否能够通过c#应用程序向客户(在varoius域和MicrosoftOffice365上)发送邮件我尝试执行下面的代码,但出现错误"Theremotecertificateisinvalidaccordingtothevalidationprocedure."MailMessagemail=null;mail=newMailMessage();string[]strToList="abc@gmail.com"foreach(stringstrIDinstrToList){if(strID!=null){mail

c# - 不能包含 Microsoft.Security.Application?

我不能包含Microsoft.Security.ApplicationusingMicrosoft.Security.Application;给出这个错误:Thetypeornamespacename'Security'doesnotexistinthenamespace'Microsoft'(areyoumissinganassemblyreference?)是的,我点击了Bin->AddReference...->AntiXSSLibrary.dll并将其添加到包含AntiXSSLibrary.xml的Bin文件夹中。我重建了整个网站,但仍然一无所获。我正在使用ASP.NET3.5

c# - Windows 8 C# Store 应用程序 - 链接到商店和评论

我们即将提交一个具有两个版本的Windows8游戏:含广告的免费版本,有3个级别完整游戏所以在有广告的版本上,我们需要一个按钮来链接到完整版的商店。在这两个版本中,我们还想放置一个按钮以链接到商店以审查每个应用。Windows8中如何处理这两种情况? 最佳答案 感谢创建Physamajig的可爱的人们,他们不仅解决了这个问题,而且还在他们的博客上分享了信息!以下是您可以直接链接到评论页面的方法:Windows.System.Launcher.LaunchUriAsync(newUri("ms-windows-store:REVIEW

c# - 如何解决错误 :the type does not appear to implement microsoft. practices.servicelocation.iservicelocator?

我是MVC的新手,我正在关注“AdamFreeman的PROASP.NETMVC4”。我目前正在研究它的第6章。我正在学习如何使用MVC4中的Ninject进行依赖注入(inject)。我已经按照书中的描述创建了应用程序。现在我不明白为什么会出现以下错误:该类型似乎没有实现microsoft.practices.servicelocation.iservicelocator这是我的Controller代码:publicclassHomeController:Controller{privateProduct[]products={newProduct{Name="Kayak",Cate

c# - 无法转换 COM 对象 - Microsoft outlook 和 C#

我编写了这段代码来查看我的outlook邮箱中的未读邮件,代码如下:Microsoft.Office.Interop.Outlook.Applicationapp;Microsoft.Office.Interop.Outlook.Itemsitems;Microsoft.Office.Interop.Outlook.NameSpacens;Microsoft.Office.Interop.Outlook.MAPIFolderinbox;Microsoft.Office.Interop.Outlook.Applicationapplication=newMicrosoft.Office.