johnvisiomvp

Life with Visio and other Microsoft Toys!

Archive for the ‘Windows 8’ Category

Universal Apps – Sort of?

leave a comment »

In WP8, I can set up a view and use a few SortDescriptions and I have view several my data in a sorted format. Not so with a universal app. The answer I received from the forums is that:

Universal apps are based on WinRT, not Silverlight. As you can see in the relevant APIs:

Windows.UI.XAML.Data.CollectionViewSource does not have a SortDescriptions property.

System.Windows.Data.CollectionViewSource does have a SortDescriptions property.

So, it appears UAs have taken a step back from phone apps.  Sorting, something that should be standard, does not exists.

Enjoy.

John Marshall… Visio MVP       Visio.MVPs.org

Advertisements

Written by johnvisiomvp

July 25, 2014 at 5:48 pm

Universal Apps – Multilingual Toolkit

leave a comment »

I fell in love with the Multilingual Toolkit when it was first introduced and found it very useful to add multiple languages to my apps. The only down side was that the submission process increased with each language. Even so, the Toolkit was useful in translating the text that is submitted with the app. All I had to do was add extra strings to the project, have them translations and then use the translations in the submission.

The XLF files use an industry standard for translators, so it is a very useful way to communicate with translators. The translator may have his own application for handling the XLF file, but the Toolkit does come with a useful app that anyone can use to do the translation. Unfortunately, the first release seemed to indicate that you had to install Visual Studio, the current version still seems to be a part of Visual Studio.

Of course, that familiarity caused problems. When you add languages in WP7 or WP8, the toolkit would automatically add the resource file (resx) and the XLF file for that language. With 8.1, only the XLF file is added. Of course, correcting that mistake is a mistake, only the resource file for the default language is needed. If you add the missing resource files, you will get a cryptic error message about duplication.

Rather than AppResources.resx, 8.1 uses resw files and the name is string/EN/Resources.resw. Converting from resx to resw is just a matter of renaming the extension, but I prefer to just copy all the strings and paste. I have yet to try it, but it should be possible to add the language to the filename as was done in WP7 / WP8.

With 8.1 the C# code for using strings from the resource file is to add

var loader = new Windows.ApplicationModel.Resources.ResourceLoader();

and
ErrorBlock.Text = loader.GetString(“ErrorCode01”)

In the xaml it is a matter of

x:Uid="Help"

to the textblock or button. This will overwrite the content of the Text or Content parameter, but they should be left in for editing. I tend to add an x to the end of the test. Unlike in WP7 and WP8, Visual Studio does not show the resource string in the editor. So the overwritten string are useful for determining the look and feel while editing.

Also  there is no XML that shows the languages being used, so the task of removing a language is just a matter of deleting the appropriate XLF file.

Another interesting thing is that the UIC can change several attributes. So for one use of a UIC, you can change the text and the width for a textblock. In the resource file it would be Help.Text and Help.Width.

Enjoy.

John Marshall… Visio MVP       Visio.MVPs.org

MVA is not just for IT guys

with 2 comments

For the past month I have been looking at MVA – Microsoft Virtual Academy.  I did check it out when it was first released, but it basically had IT Pro related courses. Though I prefer to wear a dev hat, I did play an IT Pro in the past.

My IT Pro experiences were back in the days of the dinosaurs when I roamed mainframes in the basement of a large shopping center. So I am always curious how the industry has progressed. In those days, remote access involved using the phone to get the status from an operator and deciding if the system had to be rebooted. If it dead need rebooting, you had more than enough time to drive in before the system was ready. System testing was done at 2AM Sunday, provided IBM left you a large enough time window. Sometimes you felt you were on a NASCAR pit crew when you tried to see haw fast you could bring down a production system, bring up the test system, run the test(s), bring down the test system, bring up production and then verify it was ready for hand over from the dev team to the prod team. The game has changed, things are far easier, but there are far more interesting things to do and play with.

If you are just curious about a technology, check out one of their courses. It will not give you instant understanding, but it may give you some insight to be comfortable enough to go further.

The beauty of the courses is that they have a rewind button. Each student learns at their own pace and sometimes the instructor comes out with a gem that the student wants to hear again to make sure they understand – press rewind. (On the PowerShell course it was interesting to hear the verb Claused being used with reverence.) So, you took the course last month and aced it. Review the course and see if their are any gems you missed the first time around.

You scanned the PDFs that came with the course, slept through the video, but what sunk in? Most modules in the course come with Self tests that make you think. Can you make the 80% mark and get 100% completion on the course?

So why would a dev be interested in IT courses? Some of the tools used by IT Pros are useful to devs. I spent the weekend enjoying two courses on PowerShell – Getting Started with PowerShell and Advanced PowerShell and now I have a whole slew of questions to ask Clippy. They even have courses on Database Fundamentals, Big Data, Networking Fundaments and more

Over the past month, I got carried away checking out the various courses and made it to #1 in the Top Students in Canada for the week. I have slipped to #3, but I am now #2 in Canada for the month. So join me on the Top Student board and enjoy the learning experience.

Here are some developer related courses:
Fundamentals
C# Fundamentals: Development for Absolute Beginners
Programming in C# Jump Start
Windows 8
Windows 8 UX Design Jump Start
Essentials of Developing Windows Store Apps using C# Jump Start
Advanced Windows Store App Development using C# Jump Start
XAML Deep Dive for Windows & Windows Phone Apps Jump Start
Developing Windows Store Apps with HTML5 Jump Start
Windows Store Apps with HTML5 Refresh Jump Start
Advanced Windows Store App Development with HTML5 Jump Start
Building Windows Store Apps for iOS Developers Jump Start
Gaming Engines for Windows 8 Jump Start
Windows Phone
Windows Phone 8 Development for Absolute Beginners
Building Apps for Windows Phone 8 Jump Start
Build Apps for Both Windows 8 and Windows Phone 8 Jump Start
Visual Studio/ALM Applying ALM with Visual Studio 2012 Jump Start
Administering Visual Studio TFS 2012 Jump Start
Software Testing with Visual Studio 2012 Jump Start
Web
Developing ASP.NET MVC4 Web Applications Jump Start
HTML5 & CSS3 Fundamentals: Development for Absolute Beginners
Developing in HTML5 with JavaScript and CSS3 Jump Start
Building Web Apps with ASP.NET Jump Start
SharePoint
Developing Microsoft SharePoint® Server 2013 Core Solutions Jump Start
Lightswitch
Building Business Apps with Visual Studio Lightswitch

So check out MVA – Microsoft Virtual Academy

John Marshall… Visio MVP       Visio.MVPs.org

Written by johnvisiomvp

November 25, 2013 at 3:06 pm

Formatting Debug Writeline

with one comment

For the past few months, I have been working on a Windows Phone app that uses several tables. Most of the time when I debug, I rely heavily on Debug.Writeline to help me keep track of what is going on as I test an app.  If the app crashes, I can look at Output and get a better idea where the fail occurred than trying to wander back through the Visual Studio trace. In addition to the routine names I place in the Writeline statements, I include key values, so that I can read the history of the app before the crash. The only problem is that though I use Debug.Writeline(“[Teststring]Code={0} Name={1}”,LangCode, LangName); the code is free format and it gets hard to read a table when you encase a line like that in a foreach if the length of an element like LangCode can vary between two to five characters.

Luckily there is an easy way to format items within Debug.Writeline without using Format. I can replace {0} in the Debug.Writeline with {0,-5}. The “5” sets the length of the output as five characters for the first item and the second items all line up. The minus sign indicates that the string is left justified. There are other formatting codes for numbers and dates. You can find more information on MSDN about Composite Formatting at http://msdn.microsoft.com/en-us/library/txafckwd.aspx It does not explicitly mention Debug.Writeline, but the information does apply. So if you need to print tables using Debug.Writeline to help with your debugging, try it out and check out what can be done with numerics and dates.

Though this information is out there, it is not easy to find. Luckily when I found this technique several years ago, I made a reference in OneNote. OneNote is an excellent tool for organizing trivia and I was able to quickly refind the link.

John Marshall… Visio MVP       Visio.MVPs.org

Written by johnvisiomvp

October 12, 2013 at 10:31 am

Watch your language! VS Multilingual Toolkit for Win 8

with one comment

So I survived using the Multilingual Toolkit with the phone, Windows 8 should be a piece of cake. Unfortunately, the experience could be described as crumby.

The documentation is either piecemeal, refers to older methods or different languages or has been deleted. If the Toolkit is the preferred way, the older documentation needs to be updated and simply explained.  If links must be deleted because they are out of date, there should be links to the new material. It is quite common that non MS bloggers refer to MS articles, so not providing a new link is leaving these authors hanging.

So what is different?

On the phone, adding a new language creates a new resx and a an xlf file that VS keeps in line. You only need to change the source language resx and do the translations of the content of the xlf files.  When you add new strings, click on the xlfs to start translator. Translate All will only translate the new strings so your previous work is safe.

On Windows 8, there is only one resource file with an extension of resw. The rest is the same as for the phone.

On the phone the strings use binding, so once build you will see the string while editing.

On Win 8, you use x:Uid and must include the attribute in the resw file. So you end up with XAML of  <TextBlock x:Uid=”AppName”  Text=”myApp” and the Name in the resw file would be myApp.Text. Without the binding, you only see the content of Text and you have to run the app to see the results.

On the phone the res file is just strings. In Win 8, you can have more than just strings, you can have things like Width.

With misleading documentation, a simple example would have been very useful.

Now I get to spend the rest of the weekend trying to restructure the res file and working out if there are anymore exceptions.

John Marshall… Visio MVP       Visio.MVPs.org

Written by johnvisiomvp

July 6, 2013 at 11:04 pm

Survey Says… It is your turn to help out.

leave a comment »

The IT Pro team at Microsoft Canada is focused on ensuring that they help set you up for success by providing the information and tools you need in order to be get the most out of Microsoft based solutions, at home and at work.

Twice a year, Microsoft sends out the Global Relationship Study (GRS for short); it’s a survey that Microsoft uses to collect your feedback and help inform their planning.  If you receive emails from Microsoft, subscribe to their newsletters‚ or you’ve attended any of their events you may receive the survey.

The important details:

  • Timing – March 4th to April      12th 2013
  • Sent From – “Microsoft Feedback”
  • Email Alias – “feedback@e–mail.microsoft.com
  • Subject Line – “Help Microsoft Focus on Customers and Partners”

Many of you already read the Microsoft Canada IT Pro team’s blogs‚ connect with them on LinkedIn and have attended their events in the last year or so. So you may already know that you’re their top priority. So they want to hear from you.

The Microsoft IT Pro team use the GRS results to shape what they do, how they do it and if it’s resonating with you. Tell them what you need to be the “go-to” guy (or gal) and what you need to grow your career.  They want you to be completely satisfied with Microsoft Canada.

This year, the team has delivered 30 IT Camps and counting across the country.  Giving you the opportunity to get hands on and learn how to get the most value for your organization.  They have a few more events planned this year, so keep an eye on their plancast feed for events near you.  Based on your feedback, topics they’re planning to cover will include:

  • Windows 8
  • Windows Server 2012
  • System Center 2012
  • Private Cloud
  • BYOD – Management and Security

That’s not all.  They’ve heard you loud and clear so in addition to hands on events, they’re also delivering more technical content online via the IT Pro Connection Blog.  Windows 8 continues to be a big area of focus for them.  They covered a lot of great content at launch and they’ve complimented that with new content like:

In addition to this, there are some valuable online resources you can use like Microsoft Virtual Academy, Microsoft’s no-cost online training portal.  Or software evaluations (free trials) on TechNet that allow you to build your own labs to try out what you’ve learned.

Regardless of how you engage with the team at Microsoft Canada‚ you’d probably agree that they hear you. They’d also encourage you to continue to provide that great feedback. They thrive on it‚ they relish it‚ they wallow in it and most importantly of all‚ they action it. So please keep connecting with them and keep it coming! The team is listening.

If you do not recieve an invitation to take the survey, drop a note to them on their blog or LinkedIn and let them know if they are on the right track and how they can improve.

Resources, Tools and Training

  • Tim Horton’s Gift Card Contest– Microsoft Canada is giving away 350 Tim Horton’s gift cards, all you have to do to qualify is download a free qualifying software evaluation (trial).  Download all three for more chances to win, but hurry, the contest closes soon.*
  • Windows 8 Resource Guide Download a printable, one-page guide to the top resources that will help you explore, plan for, deploy, manage, and support Windows 8 as part of your IT infrastructure.
  • Windows Server 2012 Evaluation – Get hands on with Windows Server 2012 and explore the scale and performance possibilities for your server virtualization.
  • Microsoft Support  – Get help with products‚ specific errors‚ virus detection and removal and more.
  • Microsoft Licensing  -Visit the Volume Licensing Portal today to ask questions about volume licensing‚ get a quote‚ activate a product or find the right program for your organization.

*No purchase necessary. Contest open to residents of Canada, excluding Quebec.  Contest closes April 11, 2013 at 11:59:59 p.m. ET. Three-Hundred-and-Fifty (350) prizes are available to be won: (i) $10 CDN Tim Horton’s gift card.  Skill-testing question required. Odds of winning depend on the number of eligible entries. For full rules, including entry, eligibility requirements and complete prize description, review the full terms and Conditions.

John Marshall… Visio MVP       Visio.MVPs.org

Written by johnvisiomvp

March 21, 2013 at 4:44 am

Posted in IT Pros, Windows 8

Tagged with , ,

I got a wedgie from Microsoft?

leave a comment »

For the past year, I have been working with Windows 8 and Office 2013 and have been able to install it on several old laptops, including an old Windows XP tablet (yes, there were tablets BEFORE the iPad). Windows 8 is a new paradigm, but it worked well on these old machines. The only big difference was the lack of a touch interface. The closest was the XP tablet, but the touch driver was only a single point of touch. So I started looking for a Microsoft device to fill the experience gap between Windows 8 on old hardware and a true Windows 8 machine.

The first thing that caught my eye was Microsoft’s Wedge Touch mouse. The phrase “Optimized for Windows 8 navigation” was tempting, along with “Touch”, though the phrase “4-way touch scrolling” was a bit confusing. One store clerk mis read that as four finger touch. The images on the Microsoft website did not have any points of reference for size, so it was hard to guage the size of the device. Rather than a bubble pack, the device comes in a box the size of a paper back, so my expectations was that it was something larger than the touchpad on a laptop. Which would make sense if the device supported multi finger touch.

On opening, it turns out the device is actually the size of a book of matches. Since I was not going directly home, I was expecting to have something to read while I waited, but it only contained a booklet with one page of instructions and a product guide of legal-sleaze. So I had to wait until I got home to get more information. When I did get home I found that the instructions could have used some proof reading before publishing. I have a couple of mice that have a pretty red or blue light, but they only require the dongles to be in a USB slot, but the wedge did not mention that Blue Tooth should be turned on. (I worked that out by trying the mouse on several machines, including one that hada mouse with a pretty blue light, but blue tooth was off )

So with that, I decided to download the software. When downloaded, the software thought the mouse was an Arc mouse. I also downloaded the 97 page product guide, it had to contain more than the 12 page product guide that came with the device. Nope, this time it was 97 pages of mult-lingual legal-sleaze with no useful information. In reality, there was no documentation on the device.

So, this is not the standard, I have come to expect from Microsoft, it is more the hype style of that fruit company that sells things by just sticking an i on the name. iCloud? I wonder if they ever considered releasing their own version of Data Input/Output Transfers?

I would have expected that for a premium price that the device would have been a premium product rather than another mouse. It is cute, but it is just a mouse. If it is promoted as a Windows 8 device, it should support multi-finger touch actions

As I said, I got a wedgie from Microsoft.

John Marshall… Visio MVP       Visio.MVPs.org

Written by johnvisiomvp

November 4, 2012 at 5:44 pm

Posted in Windows 8

Tagged with , ,