Soluling home   Document home


XAML options

Use this sheet to specify how XAML files are scanned. By default, Soluling scans all properties that match the scan rules. You can make Soluling scan only those items that match the scan rules and have an id attribute. In addition, you can set options that specify if and how data is scanned.

Scan options

Specifies options for XAML scanning.

Value Description
Normalize white spaces

If checked, Soluling normalizes strings in XAML elements. This means removing multiple soft white spaces between every two words. For example, if this is checked and you have the following XAML

<Label>This    is    a     sample</Label> 

Soluling will extract the value as "This is a sample" instead of "This     is    a     sample".

You should avoid using multiple soft white spaces together in an element value because they do not mean anything. XAML renderer will ignore them.

Combine Run, Span, and text elements

If checked, Soluling scans each Run element of TextBlock individually. For example, if we have

This is a <Run>small</Run> and

Depending on the value, the TextBlock is scanned in a different way:



Row values



Row 1:

This is a <Run>small</Run> and <Span>simple</Span> sample.

All sub-elements of TextBlock are scanned as a single string that contains the embedded tag names. You see everything as a single view, and you can change the order of each sub element.


Row 1:
Row 2:
Row 3:
Row 4:
Row 5:

This is a

All sub-elements of TextBlock are scanned individually using one row per each part. There is no logical connection between each row, and you cannot reorder the elements.

You should avoid the XAML code shown above. Use Binding with StringFormat or MultiBinding instead.

Remove leading and trailing white spaces

If checked, Soluling removes the leading and trailing white spaces of each string. When writing localized files, the original white spaces are added to the localized values. For example, you have this value checked, and you have the following value.

<Label>  This is a sample  </Label> 

Soluling will extract the string as "This is a sample". If the Finnish translation is "Tämä on esimerkki" then the localized XAML will contain.

<Label>  Tämä on esimerkki  </Label> 

If you have the Write stripped white spaces checkbox unchecked, then the output will be.

<Label>Tämä on esimerkki</Label> 
Localize only components that have an id attribute

If checked, Soluling scans only properties of those XAML components that have an id attribute. If unchecked, Soluling scans all properties of all components. The default value is unchecked.

Take a look at the following XAML. The panel contains two labels. The first one has the x:Uid attribute, but the second one does not have.

  <Label x:Uid="label1" Content="Hello World" />
  <Label Content="ABC" />

If you check this, Soluling scans only "Hello World". If you leave this unchecked, Soluling scans also "ABC".

Scan app.xaml files If checked app.xaml file(s) are also scanned.
This is not visible if the source is an XAML file or a set of XAML files.

Id attributes

Specifies the id attributes that mark a component as localizable. This is visible only if Localize only components that have an id attribute is checked. Check those id-attributes that you want to use mark components to be localized.

Attribute Description
x:Uid Specifies a localization specific identifier for the component.
x:Name Specifies a name of the component.
Name Same as x:Name.
x:Key Specifies a key of a style.

By default, only x:Uid is checked that makes Soluling scan properties if the component uses x:Uid attributes. Name and x:Name attributes are used when you have to access a component from code. This is why it does not necessarily mean that it should be localized. x:Uid, on the other hand, is used only with localization. If your use Name or x:Name attributes to give a localization context, also check those checkboxes.