Skip to main content
2 of 5
added 881 characters in body
Mathieu Guindon
  • 75.1k
  • 18
  • 191
  • 463

XAML is XAML - I'm not sure what the meaning of "syntetic" is in this context, but the only thing I can see that could improve, is the closing tags for <Binding> - the empty elements can be collapsed:

<MultiBinding StringFormat="{}{0:N} {1}">
  <Binding Path="Income" />
  <Binding ElementName="UserControl" Path="DataContext.Pinco" />
</MultiBinding>

There aren't 20 different ways of specifying the horizontal alignment of a TextBlock:

<TextBlock HorizontalAlignment="Right">

I don't anything wrong with this.


Actually the indentation could use more spaces, too - but that's cosmetic (and probably just a copy/paste glitch with the tabs):

<GridViewColumn Header="trial" Width="110">
    <GridViewColumn.CellTemplate>
        <DataTemplate>

            <TextBlock HorizontalAlignment="Right">
                <TextBlock.Text>
                    <MultiBinding StringFormat="{}{0:N} {1}">
                        <Binding Path="Income" />
                        <Binding ElementName="UserControl" Path="DataContext.Pinco" />
                    </MultiBinding>
                </TextBlock.Text>
            </TextBlock>

        </DataTemplate>
    </GridViewColumn.CellTemplate>
</GridViewColumn>

I like using vertical whitespace to separate things - it makes the markup easier to read, and maintain.

Mathieu Guindon
  • 75.1k
  • 18
  • 191
  • 463