Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set a margin from a binding

I have a binding value that returns a int that represents a value I wasnt to assign to left and right margins of an element.

Heres what I've tried but it wont compile.

It works if I set the entire margin, but I only want left and right.

Xaml:

<Image x:Name="_image" Source="mat.png" Margin="{Binding EditorRow.BondIndent},0,{Binding EditorRow.BondIndent},0" />

class:

public int BondIndent
{
    get { return _bondSequence * 5; }
}
like image 932
user589195 Avatar asked Jan 16 '13 14:01

user589195


People also ask

How do I set binding margins?

Set gutter margins for bound documentsOn the Page Layout tab, in the Page Setup group, click Margins >Custom Margins. In the Multiple pages list, click Normal. In the Gutter box, enter a width for the gutter margin. In the Gutter position box, click Left or Top.

What is a binding margin?

Binding Margin (Explanation) A binding margin is the vertical space without any text, on each page, used for stitching, drilling or whatever method is used to hold the pages together. The binding margin is measured in characters or braille cells on an embosser, or in inches or millimeters on a printer.

Which margin is used only for binding?

The "gutter" is the inside margins or blank space between two facing pages. The gutter space is that extra space allowance used to accommodate the binding of pages in books or binders.

How big margin for binding?

For bound books 6"x 9" or smaller, use 0.5" margins on the top, outside and bottom of books, and a 0.75" inside margin. For 8.5"x11" documents (bound or unbound), use 1-inch margins.


1 Answers

Return the margin?

public Thickness Margin
{
    get { return new Thickness(BondIndent,0,BondIndent,0);}
}

Then change:

<Image x:Name="_image" Source="mat.png" Margin="{Binding EditorRow.Margin}" />
like image 113
Luuk Avatar answered Sep 19 '22 19:09

Luuk