Building world-ready Metro style apps with XAML APP-528C Building world-ready Metro style apps with XAML Tim Heuer Program Manager Microsoft Corporation © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Agenda What’s new/different for XAML localization How Visual Studio tools will help API versus markup approaches Element versus layout approaches
XAML localization history BAML RESX Data binding approaches
Design and plan for localization Start right and plan for localization Organize assets in Visual Studio Use element markup in XAML to prepare ahead
Planning ahead makes localizing your XAML app later as easy as providing new resources and re-packaging the app.
Visual Studio project organization Introduction of RESW file and Editor (new for Native) Understanding path-based mapping of project resources Native project system nuances due to filters versus folders
API differences for resources For .NET developers No strongly-typed class representation using RESX No embedded resources in DLLs For native developers No .rc files NEW for both Use Windows Runtime resource APIs to extract string/path resource information from package
Extracting string resources (new) ResourceLoader resources = new ResourceLoader(); string welcomeText = resources.GetString("WelcomeText"); C++ ResourceLoader^ resources = ref new ResourceLoader(); String^ welcomeText = resources->GetString("WelcomeText"); © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Using new markup support x:Uid support for element-based localization Have the XAML parser works for you Same for native or managed Advanced RESW annotation for user controls
Localizing a TextBlock <Grid x:Name="LayoutRoot" Background="#FF0C0C0C"> <TextBlock x:Uid="MyTextBlock" FontSize="72" /> </Grid>
Full layout localization New mechanism allows you to wholesale replace pages RTL locales Special cultural considerations Requires more forethought and care due to markup compile
Using x:Uid for localization in XAML demo Using x:Uid for localization in XAML © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Testing your localization Using ResourceContext to test Changing ultimate fallback language
Related sessions [411] Reach a worldwide audience by building a world-ready app (must see)
Further reading and documentation Windows Developer Center http://go.microsoft.com/fwlink/?LinkID=227201 Windows SDK Samples http://go.microsoft.com/fwlink/?LinkId=221708 Contact info – xamlfeedback@microsoft.com
thank you Feedback and questions http://forums.dev.windows.com Session feedback http://bldw.in/SessionFeedback
5/5/2018 9:39 AM © 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. © 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.