Edi Wang

Microsoft MVP for Azure

All Posts

微软 Build Tour 2017 上海一日游

Build是微软从2011年开始举办的开发者大会。我作为一个使用微软技术的开发者,当然每年都不会错过这样的一场盛宴。然而,Build的主会场永远都是在美国,这让其他国家的信徒们无法接近我大微软。于是,从2015年起,微软会在Build结束之后,到世界各国的主要城市开设免费巡演活动,内容都是Build大会的精选。 图为我当年在家里用电视观看Build 2011   我曾经在2015年参加过微软在上海的Build Tour,留下了非常深刻的好印象。于是今年,我当然不能错过Build 2017 Tour的上海场了。今年的Tour有2天,第一天是Session第二天是编程马拉松,我怕技术被人鄙视,所以只报名了第一天的内容。 今年微软在中国确实更给力了,这次的Tour是紧接着Build 2017午夜啪活动之后的。中国午夜啪的其中几位主持人也来到了Build Tour,都是软狗们熟悉的面孔~ 虽说今 …
Microsoft

Migrate Domain DNS to Azure

It has been a while since Azure DNS went GA on Azure. It's like "dnspod" in China, offers a third party DNS services besides your domain register. The power of Azure has already been witnessed by the entire human race. Now that, it has got DNS services, it would surly be the best in class DNS on the planet. Thus, what we have to do, is to migrate our DNS servers to Azure DNS. So that your website …
Azure DNS

Configure Continuous Delivery for ASP.NET Core Website on Azure

Today I am trying new DevOps tools in VS2017 and Azure, my goal is to automate the process from development to production for an exsiting ASP.NET Core project. I have encountered some issues, and with the help of Microsoft Support, I was able to solve them and share with you guys. First, there are two ways to configure CD for Azure Web Apps. I prefer create a website first, then configure it from …
.NET ASP.NET Azure DevOps

How to Save InkCavas to Image in Windows 10 UWP

The InkCanvas control in Windows 10 UWP is not like WPF where you can save as image file easily. If you want to save user ink to an image file, there's by far only one way to do it: 1. Install Win2D.UWP via NuGet into your project. PM> Install-Package Win2D.UWP 2. Because we need to access user's picture library, so we need to apply the permission in manifest file. Select "Pictures Library" …
Windows UWP

Azure Fire Alarm by Raspberry Pi and Windows 10 IoT Core

防火是日常生活中非常重要的意识,如果你恰好有Windows 10的设备,比如Lumia,Surface,能及时收到火警是至(mei)关(sha)重(luan)要(yong)的。今天就教大家如何用Microsoft Azure公有云+Windows 10 IoT Core在树莓派上实现一个远程火警系统。阅读这篇文章,你需要的前置知识:Windows 10,UWP的基本开发能力,MVVM基础知识,ASP.NET MVC的基础知识,树莓派、GPIO及逻辑电路的基本知识(也就是大学里的计算机电路),Azure公有云的使用经验……当然,还要有对微软的信仰
Windows Azure IoT Raspberry Pi

Create QR Code in Windows 10 UWP

A year ago, I wrote an UWP application that can generate QR Code. However, at that time, the QR Code library I used was ZXing.Net, the last update for this package was in 2014. Now, time has changed, the author of ZXing.Net seems not to update the package any more. However, we have to move on, so I found a fantastic new library to generate QR Code in .NET applications: QRCoder To use that package, …
UWP

Merge Data for N-N Relationship Tables in T-SQL

Recently, I have been organizing my blog data and needed to perform an operation to merge article categories. On my blog, articles and categories have a many-to-many relationship. That is, one article can belong to multiple categories, and one category can contain multiple articles. This is a very typical many-to-many relationship, and I use a many-to-many table with a composite primary key to associate this data. What I need to do is move articles from the "DotNetBeginner" category to the "CSharpAndDotNet" category. However, since some of the articles originally in the "DotNetBeginner" category also belong to "CSharpAndDotNet", directly updating the association table would result in duplicate composite keys, which would cause issues.
SQL SQL Server

Get system font and characters in Windows 10 UWP

There used to be a {x:Static Fonts.SystemFontFamilies} in WPF that can bind to system font list very easy. However, this is gong in UWP! How stupid it is! These days I wrote a character map UWP application, that would use system fonts, so I did some research. In order to get system font in UWP, we must use DirectX. Install these 3 NuGet pacakges into your project: "SharpDX": "3.0.1", " …
Windows UWP DirectX

How to Remove ListView Default Selection in Windows 10 UWP

A lot of people including me has encounter a problem where on UWP apps, if a ListView control is being data binded, it will get a default selected item like this: It not only will display as selected item, it also fires SelectionChanged event. However, if we want to make ListView clickable, a popular way is to write the SelectionChanged event handler like this: private void StationsList_ …
Windows UWP

How to make a modal progress dialog in Windows 10 UWP

Windows 10 Mobile上的文件管理器有这样一个进度指示器,它是一个模态框,不带任何按钮,只有进度条和文本: 今天我琢磨了很久,绕了一些弯路,发现其实要做一个这样的模态进度指示器很简单。只要用ContentDialog就行。 平时我们用ContentDialog有些思维定势,就觉得这个对话框一定要提供按钮给用户操作。其实它是可以不设置任何按钮的,这样就有了初步的雏形: XAML C# private async void BtnSitAndRelax_OnClick(object sender, RoutedEventArgs e) { // show progress await ModalProgressDig.ShowAsync(); } …
Windows UWP