Category Archives: Localisation

Where are my modal dialogs? (Visual Studio LightSwitch)

Visual Studio LightSwitch – Where are my modal dialogs?

The original and genuine Power Tools for Visual Studio LightSwitch!

The LightSwitch Explorer window is upgraded in AIDE V1.1 Preview. The next version of the LightSwitch power tools is being tested and here is a sneak preview which you can download.

View of LightSwitch

AIDE Explorer View of LightSwitch Modal Dialogs

The LightSwitch Explorer window now has a view to show all LightSwitch modal dialog windows in a solution. There is no need to click through several layers of menus and designer commands to find modal dialogs, the information is served up in a convenient and easily digestible format. Navigate to LightSwitch Screen Designer from the modal dialog view with a simple double-click. It nicely complements the standard LightSwitch designer.

Surfacing all data in tabular format, can improve productivity, in particular, when working with medium to large LightSwitch projects.

ooo

There are many more features in design, development and testing. This past few weeks have been busy with the Visual Studio 2013 Preview and Michael Washington’s new E-Book released and ComponentOne providing an exclusive release of the ComponentOne Studio for LightSwitch HTML to the members of the LightSwitchHelpWebsite.com! For a member’s discount code offer you must register at LightSwitch Help Website , the main independent LightSwitch community website.

Try them, buy them, and support your LightSwitch tooling ISVs.

Also, do participate in forums and vote on your desired AIDE features. Help us to help you by prioritising the features in the product roadmap! Export/Import entities and screens, check. Entity Workbench, check. VS2013, check. How about a localization workbench? Optimization and analysis workbench? Mmm, we like that… Update which metadata fragments? That is a flavour of a few forthcoming features, we need to keep a few things secret to surprise you though!

ooo

Company information: Xpert360 Ltd, founded in 2009, is an Independent Software Vendor and Custom Solution Provider base in the UK.

Xpert360 Lightning” and “AIDE for LightSwitch” are trademarks of Xpert360 Ltd, copyright 2013.

New Entity Workbench for LightSwitch

LightSwitch Entity Workbench in Xpert360 Lightning AIDE V1.1 Preview

The original and genuine Power Tools for Visual Studio LightSwitch!

The LightSwitch Entity Workbench is a new feature of AIDE V1.1 for LightSwitch. This next version of the power tools is being tested and we are going to show a sneak preview. There is a later version of this preview available to download. In this post we will outline the high-level features of the new workbench.

AIDE for LightSwitch is supplied as a signed Visual Studio Extension. Future releases will also move towards GitHub for easier distribution of upgrades.The AIDE software is integrated into the Visual Studio IDE as standard and familiar dockable windows. The LightSwitch Entity Workbench window can be accessed from the ‘View‘ menu ‘Other Windows‘ and upon first launch will display as below.

AIDE Entity Workbench window

AIDE Entity Workbench for LightSwitch

The window can be dragged, docked and controlled just like any other Visual Studio IDE windows. You will have to experiment with the placement as everyone has their own configuration preferences. The Entity Workbench window brings all information for a selected entity into one place. There is no need to click through several layers of menus and designer commands to view fragmented data, it is served up in a convenient and easily digestible format. It nicely complements working in the standard LightSwitch Entity designer window.

It surfaces all the data in tabular format for easy reviewing. This improves productivity, in particular, when working with medium to large LightSwitch projects. The insights that this gives you make this not just an add-in but an essential development tool.

Workbench window sections:

  • Entity properties and commonly used settings
  • Related screen dependencies
  • Choice lists groups and settings
  • Custom properties and their settings
  • Relationships to other entities
  • Custom and in-built entity queries

The entity properties section enables you to view and compare settings with the need to click on individual column and then view in the properties window. The standard designer is unwieldy in this respect with wide tables.

Entity properties and settings

Entity properties and settings

Here you can see instantly which columns are searchable, maximum lengths, maximum/minimum values and much more. This makes any process of checking settings and quality assurance a whole lot easier. You can sort the data by any column, rearrange the column order and export to the clipboard as standard. Using AIDE to export all entity data to Office documents is a big time saver for project documentation. The data views support clients of V2 and V3 flavors, and support multiple LightSwitch projects in a solution.The VS2012 Update 2 and preview of LightSwitch V4 in VS2013 deliver a new ‘related to’ feature in designers. Why wait? It is there now in AIDE for your V2 projects in the Related Screens section from where you can also launch the related screens in design mode.

Screen dependencies in AIDE Entity Workbench

Screen dependencies in AIDE Entity Workbench

Another time saver in the above screen capture is the display of choice lists. Normally, you would click on columns in screen designer and drill-through the standard properties windows just to view a choice list in a modal window.

We have singled out custom properties for special treatment. Custom property types include Money and PhoneNumber which AIDE helps to tame. A V1.1 enhancement to the LightSwitch Explorer window provides a solution-wide view of PhoneNumber format mask settings. Not normally easy to find at all! One view verifies whether all your phone number formats match.

AIDE Entity Workbench Custom Properties

AIDE Entity Workbench Custom Property settings

We have saved Updating LightSwitch metadata until this next version V1.1 as we had not completed the full cycle of testing in time for the first release. The much anticipated one-click Clone Screen feature did make the V1.0 and is being put to good use already. We anticipate that solution-wide editing of format masks will be an item on the feature request list for later implementation (subject to demand).

ooo

There are many more features in design, development and testing. This past week has been busy with the Visual Studio 2013 Preview and Michael Washington’s new E-Book released and ComponentOne providing an exclusive release of the ComponentOne Studio for LightSwitch HTML to the members of the LightSwitchHelpWebsite.com! For a member’s discount code offer you must register at LightSwitch Help Website , the main independent LightSwitch community website.

Try them, buy them, and support your LightSwitch tooling ISVs.

Also, do participate in forums and vote on your desired AIDE features. Help us to help you by prioritising the features in the product roadmap! Export/Import entities and screens, check. Entity Workbench, check. VS2013, check. How about a localization workbench? Optimization and analysis workbench? Mmm, we like that… Update which metadata fragments? That is a flavour of a few forthcoming features, we need to keep a few things secret to surprise you though!

ooo

Company information: Xpert360 Ltd, founded in 2009, is an Independent Software Vendor and Custom Solution Provider base in the UK.

Xpert360 Lightning” and “AIDE for LightSwitch” are trademarks of Xpert360 Ltd, copyright 2013.

Installing Xpert360 Lightning AIDE Power Tools

Xpert360 Lightning AIDE V1.0 for LightSwitch

The original and genuine Power Tools for Visual Studio LightSwitch!

Xpert360 are very proud to announce that AIDE Version 1.0 is available as of the week commencing 8th July 2013. Both trial and full commercial licensing options are available. This version supports LightSwitch V2 and V3 projects in Visual Studio 2012 Update 2.

This post outlines the steps to install the software and how to find your way around the new power tools.

Xpert360 Lightning AIDE VSIX

Xpert360 Lightning AIDE VSIX

The software is supplied as a signed Visual Studio Extension that can be run by simply double-clicking on the ‘vsix’ file.

Xpert360 Lightning AIDE V1.0 in VSIX Installer

Xpert360 Lightning AIDE V1.0 in VSIX Installer

Running the VSIX installer displays product details, digital signature and license terms. You can verify that the software is available by running Visual Studio 2012 and choosing the ‘Extensions and Updates…‘ menu option on the ‘Tools‘ menu. You can follow the links to more information including quick start guide and a range of FAQ and other posts.

AIDE in VS2012 Extensions and Updates

Xpert360 Lightning AIDE in VS2012 Extensions and Updates

The AIDE extension appears as above in the list of installed extensions.

You will have been provided with a license key along with the software. The next step is to run the ‘Xpert360 AIDE Console‘ that is located in the Visual Studio ‘Tools‘ menu. The software will not operate until the license key is activated.

Xpert360 AIDE Product Licensing

Xpert360 AIDE Product Licensing

The product licensing is managed here. You must enter the email that you supplied when obtaining the license and the actual license code. If you enter a trial code then this is where to return to upgrade to a full license later.

The AIDE software is integrated into the Visual Studio IDE as standard and familiar dockable windows. Any messages from the software are written to a dedicated AIDE pane in the standard Output Window.

AIDE_OutputPane

If there are any problems during license activation you can use the messages in the modal dialog and the output pane to diagnose the issues and provide feedback to the support team. The support forums are here.

This version provides two window views that can be accessed from the ‘View‘ menu ‘Other Windows‘ option as below.

AIDE Windows for LightSwitch - Explorer and Screen Workbench

AIDE Windows for LightSwitch – Explorer and Screen Workbench

The windows can be dragged, docked and controlled just like other Visual Studio IDE windows. You will have to experiment and feedback where you like to place the windows in the IDE. Everyone has their favourite configurations for various times of the development cycle.

ContosoMoving in AIDE windows

ContosoMoving in AIDE windows

Here the LightSwitch Explorer window is docked in the main designer area and the LightSwitch Screen Workbench below it.

The explorer window gives you access to a diverse list of views of your LightSwitch projects’ metadata. The data views cut across the project metadata allowing you to discover, review and export data that is not easily available through the standard LightSwitch designer windows.

AIDE LightSwitch Explorer Data Views

AIDE LightSwitch Explorer Data Views – View code files

The data views collate information across client, common and server tiers, supporting multiple LightSwitch clients of V2 and V3 flavors, and supporting multiple LightSwitch projects in a solution.

AIDE for LightSwitch - Screen Workbench

AIDE for LightSwitch – Screen Workbench

The Screen Workbench brings all information for a selected screen into one place. There is no need to click through several layers of menu and designer commands to view fragmented data, it is served up in a convenient and easily digestible format.

The preview of LightSwitch V4 in Visual Studio 2013 delivers a new ‘related to’ feature in designers. Why wait? It is there now in AIDE for your V2 and V3 projects.

We have saved Updating LightSwitch Metadata until the next version V1.1 as we have not completed the full cycle of testing. The much anticipated one-click Clone Screen feature did make the final cut for V1.0 and features in this workbench.

The AIDE windows support drill through contextual links to more AIDE data views, LightSwitch screen and entity designers, to code-behind file designers and editors. The one-click navigation options save you from the hassle of searching and locating items through multiple UI actions.

There are many more features in design, development and testing. This week has been busy with the Visual Studio 2013 Preview and Michael Washington’s new E-Book released and ComponentOne providing an exclusive release of the ComponentOne Studio for LightSwitch HTML to the members of the LightSwitchHelpWebsite.com! For a member’s discount code offer you must register at LightSwitch Help Website , the main independent LightSwitch community website.

Try them, buy them, and support your LightSwitch tooling ISVs.

Also, do participate in forums and vote on your desired AIDE features. Help us to help you by prioritising the features in the product roadmap! Export/Import entities and screens, check. Entity Workbench, check. VS2013, check. How about a localization workbench? Optimization and analysis workbench? Mmm, we like that… Update which metadata fragments? That is a flavour of a few forthcoming features, we need to keep a few things secret to surprise you though!

o

Company information: Xpert360 Ltd, founded in 2009, is an Independent Software Vendor and Custom Solution Provider base in the UK.

Xpert360 Lightning” and “AIDE for LightSwitch” are trademarks of Xpert360 Ltd, copyright 2013.

PivotViewer Shorts Part 4: Restyle the ZoomSlider child controls

Introduction
By default the SL4 PivotViewer control displays a custom control for controling the zoom-level of the tile views. A few people have expressed a wish to totally reskin the control and this is a step along that path that hints at the technique needed to dig deeper into the PivotViewer visual tree.
 
This short post shows how to locate the UI element for the control bar, the ZoomSlider, all its visual elements and then alter their background.
 
PivotViewer ZoomSlider Re-Styling

PivotViewer ZoomSlider Re-Styling

 

Locating the UI Elements

The flow of the code goes something like this:

  • Locate the “PART_Container” in the tree. This is a Grid control.
  • Or… go direct to the “PART_ControlBar” element.
  • Locate the ControlBarView to access the child controls.
  • Build a list of child controls using VisualTreeHelper.
// Locate UI Elements
    ControlBarView ControlBar = (ControlBarView)this.GetTemplateChild(“PART_ControlBar”);
    Grid ctrlBarContent = (Grid)ControlBar.Content;
    DockPanel ctrlBarDockPanel = (DockPanel)ctrlBarContent.Children[2];
    ContentControl ZoomSlider = (ContentControl)ctrlBarDockPanel.Children[2];
    ContentControl cc1 = (ContentControl)ZoomSlider.Content;
//

// Build a list of the child controls
    var ctrls = GetChildsRecursive(cc1);
//

// Pick out controls and re-style as you wish 
    foreach (UIElement ctrl in ctrls)
    {
        string s = ctrl.GetType().ToString();
        switch (s)
        {
            case “System.Windows.Controls.Button”:
            Button b = (Button)ctrl;
            b.Background = new SolidColorBrush(Colors.Orange);
            break;
        case “Microsoft.Pivot.Internal.Controls.ClickDragSlider”:
            ClickDragSlider cds3 = (ClickDragSlider)ctrl;
            cds3.Background = new SolidColorBrush(Colors.Green);
            break;
        default:
            break;
        }
    }
;

// Helper function for child controls
IEnumerable<DependencyObject> GetChildsRecursive(DependencyObject root)
{
    List<DependencyObject> elts = new List<DependencyObject>();
    elts.Add(root);
    for (int i = 0; i < VisualTreeHelper.GetChildrenCount(root); i++)
        elts.AddRange(GetChildsRecursive(VisualTreeHelper.GetChild(root, i)));
    return elts;
}
+
FAQ
If you want to try out the code there are a few things to watch out for.
+
You will need some internal Microsoft Pivot references and usings too. Depending upon the extent of your other customizations you will need these:
+
using System.Windows.Pivot;
using Microsoft.Pivot.Internal.Controls;
using Microsoft.Pivot.Internal.Model;
using Microsoft.Pivot.Internal.ViewModels;
using Microsoft.Pivot.Internal.Views;
+
Further things to do
Conclusion
This article is a brief guide to locating some visual elements of the Silverlight PivotViewer control in order to customize the styling of the ZoomSlider control. It targets the developer who has already started customizing the Silverlight PivotViewer control beyond the public API.
 
Any comments or request for future topics are welcome.
 

Adventures with PivotViewer – Part 3 Localization

You want to skin your PivotViewer controls but you also need to localize them for your users. The download files contain a full set of resource strings as contained in the assembly ‘System.Windows.Pivot.StringResources’ (1.0.6079.0).

You can override the PivotViewer ResourceManager using the PivotViewer.SetResourceManager() API method to set the external ResourceManager.

[UPDATE] The documentation has moved to: SetResourceManager and the PivotViewer API.

[C#]
System.Windows.Pivot.PivotViewer.SetResourceManager(SampleLocalizedStrings
.ResourceManager);

The PivotViewer control is globalization aware and even custom date formats, such as those shown in Graph View when drilling into DateTime categories, are defined in the resource files:
Silverlight Pivot Control Release Notes: Localization and Globalization

You can localize your PivotViewer application in the same manner as any other Silverlight application. Instructions for creating satellite assemblies can be found here:
How to: Add Resources to a Silverlight-based Application

The collection of resource files includes the following languages for a start:
French / Francaise : fr
German / Deutsch : de
Japanese / 日本語 : ja
Chinese (traditional) / 中文 : zh-CN
Russian / Русский язык : ru

e.g. Russian: ru
CardinalitySortLabel=(количество)
ClearAllFiltersButton=Убрать сортировку
CustomFilterPrompt=Что ищем?
See blog post: Как использовать PivotViewer для Silverlight в реальном проекте (часть I)
… and sample collection: Главная – Рецензии
Notice that Microsoft folks did not do a full translation, notice the ‘(no info)’ …

We can make this a community effort. If you like what you see than pass back corrections and additonal translations and I will post them here. If there is enough interest perhaps we can place the resource files on CodePlex.

[UPDATE] The full set of string resources finally got published by Microsoft here: Pivot_Internal_StringResources_Resources

Enjoy!

Download the resource files: PVSampleResx.zip