Edi Wang

All Posts 290


Windows 10 UWP: Switching Languages in Your App

By default, a UWP App's UI language is automatically fits the system current language settings. However, what if the user need the ability to set a particular UI language just for your App without having to change system language? In my App, I supports Simplified Chinese and English. The user can override the system language in App's settings page: So how to do it? First, you need to have res...

UWP Localization

Windows 10 UWP: How to Read and Save Settings Easily

In the UWP Application model, reading and saving settings are very similar to WinRT API. The class we are using is ApplicationData.Current.LocalSettings It is using key-value-pair to store settings. LocalSettings will stay on the user's current computer, and not being synced with thier Microsoft account. The API to save settings is: LocalSettings.Values[key] = value; To read settings:  if (Lo...

Windows 10 UWP

Windows 10 UWP: How to Debug OnFileActivated Launch Failure

Today I am working on my Image Portray App, and I get my code blown up. The problem is, when the App is already started, it can open .ink file with double click from a file. But when the App is not launched, opening a .ink file to start the App will make it crash. As other UWP that supports file type association, I also use OnFileActivated event to launch my App. This kind of problem could not be...

Debug Visual Studio UWP

10 Tricks and Tools for Windows 10 UWP Development

After Windows 10's launch. More and more UWP applications are coming as well as more Windows developers. I am doing UWP development besides my job for more then 2 years. Today, I will share some tips and tricks from my UWP development experience as well as some handy tools, so that you can do your development more quicker and easier. 1. Automatically Set Color to Title Bar The default color...

UWP

一个死忠软粉亲身经历的Surface产品的品控和售后

这几天关于Surface硬件质量差的问题,在国内闹得沸沸扬扬,起因是美国消费者协会因为发现25%的Surface用户在使用2年内机器都会爆,所以将Surface系列移出了推荐。加上国内大环境本来就是吹苹果黑微软的多,这下可真够热闹的。然而这一次,我觉得Surface真是自找的,尤其是国内。今天我就整理一下我亲身经历过的品控事件。 首先,我保证本文的内容均为可以考证的100%事实,不吹不黑。我本人是个死忠软粉,拥有Surface RT, Surface Pro 3, Surface Pro 4, Surface Pro 2017, Surface Laptop, Lumia 520, 625, 640, 720, 928, 1520, 950XL, 正版Windows自费购买5份,国内没有的我还专门美国代购过,都是Pro版, Office 365(家庭版), Visio, Proj...

Surface

Windows 10 UWP: Undo / Redo Ink with Surface Dial

The Surface Dial is the first wheel device in a new input device class. I got my hand on one as soon as it came to market in China. I have a UWP App named "Image Portray", as a drawing app that can make use of the Surface Dial. One of it's useful application to undo / redo the ink by turning the Surface Dial. You can download it from Windows Store these days to see the changes. So, let's begin w...

UWP Surface Dial

Windows 10 UWP: Undo / Redo on InkCanvas

The InkCanvas in UWP only got pens by default, it can not perform Undo or Redo. To implement this, we will need to code for ourselves. Official document covered Undo functionalilty, but not redo. Today, I have successfully done it, and I'd like to share with you. First, you need to add two custom buttons on the InkToolbar for Undo / Redo 1. Undo the Ink We need a few A...

Stack UWP InkCanvas

Remote Deploy and Debug UWP Apps

These days I am developing an App that need to be tested on multiple languages environment. I can set my local dev box to different language, and restart or sign out / sign in to Windows again to test different languages. But this is very inconvenient. I want to setup a Windows 10 virtual machine with Chinese language and let Visual Studio 2017 deploy and debug the App right into the VM. Back the...

Debug UWP

微软 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 Build

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