Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

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 see 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.


EDIT: Considering that there would be 20x such markup, with the only thing changing being the <Binding Path="Income" /> part, as @GeorgeHowarth commented you can look into making the DataTemplate a StaticResource, like thislike this.

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 see 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.


EDIT: Considering that there would be 20x such markup, with the only thing changing being the <Binding Path="Income" /> part, as @GeorgeHowarth commented you can look into making the DataTemplate a StaticResource, like this.

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 see 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.


EDIT: Considering that there would be 20x such markup, with the only thing changing being the <Binding Path="Income" /> part, as @GeorgeHowarth commented you can look into making the DataTemplate a StaticResource, like this.

typo
Source Link
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 see 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.


EDIT: Considering that there would be 20x such markup, with the only thing changing being the <Binding Path="Income" /> part, as @GeorgeHowarth commented you can look into making the DataTemplate a StaticResource, like this.

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.


EDIT: Considering that there would be 20x such markup, with the only thing changing being the <Binding Path="Income" /> part, as @GeorgeHowarth commented you can look into making the DataTemplate a StaticResource, like this.

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 see 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.


EDIT: Considering that there would be 20x such markup, with the only thing changing being the <Binding Path="Income" /> part, as @GeorgeHowarth commented you can look into making the DataTemplate a StaticResource, like this.

added 291 characters in body
Source Link
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.


EDIT: Considering that there would be 20x such markup, with the only thing changing being the <Binding Path="Income" /> part, as @GeorgeHowarth commented you can look into making the DataTemplate a StaticResource, like this.

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.

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.


EDIT: Considering that there would be 20x such markup, with the only thing changing being the <Binding Path="Income" /> part, as @GeorgeHowarth commented you can look into making the DataTemplate a StaticResource, like this.

added 881 characters in body
Source Link
Mathieu Guindon
  • 75.1k
  • 18
  • 191
  • 463
Loading
Source Link
Mathieu Guindon
  • 75.1k
  • 18
  • 191
  • 463
Loading