My UWP application "Shanghai Metro" has an option to allow user save the metro graph to local file system. The image file is located under project directory, "Assets\shanghaimetro-xl.jpg", and will ask the user to choose a location when saving the image. This is a very common functionality, it's also easy to achieve in UWP applications. The most easy way to do it is to use my library "Edi.UWP. …
今天在爆UWP的定时后台任务,坑有点多。有的坑在很多网上的文章里都没提到,非常的坑。刚刚开荒成功了,把经验写出来分享: 1. 写一个后台任务的类,继承IBackgroundTask接口 通常,在设计应用程序结构的时候,我们会建类库项目(Class Library)放这些类。比如 FarkBackgroundTask.Core 因为是UWP工程,所以建的类库也要是Universal Windows的。注意,这里我们已经埋下了一个巨坑,稍后会解释。 我们的类代码如下: public class SayFarkTask : IBackgroundTask { public void Run(IBackgroundTaskInstance taskInstance) { Debug.Write("================ Fark the
The animation effect of the Pivot widget in UWP is different from the previous Pivot in Windows 8 and Windows Phone 8, when switching PivotItem, the header of the currently selected Item will not run to the first one, but simply highlight the current Tab like a Tab tab. Personally, I like Windows 8's Pivot, which is like this GIF (which is a UWP app I'm working on). If you also like the traditional style of Pivot, you can refer to the following methods.
When you change the domain name for your website, you are definitely going to solve the migration problem. You cannot just stop DNS on your old domain, because this will cause your indexed pages to be deleted by search engines. The correct way is to tell the search engine that you have a new domain name now, which is when the user accesses an old URL, redirect it to the new URL. Take my blog …
Visual Studio 2015 has been RTM for one month. However, it blows up very often, such as Razor editor. When I try to open any .cshtml file, it blows up with this error, then the syntax highlight is gone. I tried to uninstall all add-on, even repair install VS2015 can't get it working. The detailed error message is: System.Reflection.TargetInvocationException: Exception has been thrown by the …
The website we created on Azure seems can be only managed in the web portal or in the Server Explorer of Visual Studio. If we would like to use IIS to manage more powerful scenarios, seems VM is the only way. But that's not true. First, the IIS comes with Windows 8.1 can't connect to Azure by default. We need to install an extension http://www.iis.net/downloads/microsoft/iis-manager After install. …
If you are using Website on Microsoft Azure (Currently renamed to Web Apps), you will find the .woff web font is not working in IE, it returns 404. Based on my experience, this is because IIS is not configured to use the correct MimeType. However, we can not operate the IIS on Azure, there's no RDP into an Azure Web Apps backend machine. How can we do that? In fact, after IIS7, the MineType is …
今天做了次数据库迁移,目的是开个最新版的Azure SQL Database(V12 Update),然后把博客的数据库迁移到新的server上去。按以往的做法(也就是我曾经写过的《图解:如何将SQL Server数据库迁移到SQL Azure 》),把bacpac文件下载下来,然后import到新的数据里,结果爆了: 爆炸是因为Web Tier和Business Tier在最新版的Azure上面已经被微软撸掉了,SSMS 2014却没有升级,不认识这两个Tier,还在用老的Web Tier。 TITLE: Microsoft SQL Server Management Studio ------------------------------ An exception occurred while executing a Transact-SQL statement or batch.
Sometimes, in order to get necessary permissions, we will assign domian accounts or local accounts for IIS app pool. For example, it usually happens for SharePoint deployment. However, this is not a secure way, because the password for these accounts are saved in clear text. For local accounts, the password is not readable. But if you are using domain accounts. The IIS Admin can read your …
Previously, in Silverlight Runtime, to set a minimized toolbar, you would simply set the 'Mode' property of the 'ApplicationBar' to 'Minimized'. This no longer works for Windows Phone Runtime 8.1. Tt appears minimized in the XAML designer, but it will still be expanded when running. Let's see how to fix it. …