Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
165
Field width binding to slider-value not working at runtime
posted

Hello,

I have a quetion concerning BINDING the width of a specifice field to a slider-value in XAML.

My grid's first field is retemplated by showing a viewbox with a specific shape in it.

On my XAML I have a slider for controlling the width of the viewbox via binding. This works perfectly and my shape in it is growing/shrinking as I move the slider.

But when my shape grows, the datagrid rows grows also --> so perfect. (shrinks also)

But my the field/column width  does NOT change (grow).

 

  • Is there a setting which does take care of automatic GROWING of the width for a field, just like the auto-sizing in height.

 

I also tried to BIND the width of the field via the fieldsettings, but changes in the slider are not reflected (width of column does not change)

I tried several comibantions of the cell-label-min/max/width. But none seems to reflect to a binding at runtine.

 

 

 

 

 

 

 

 

 

 

<

 

igDP:FieldLayout.Fields>

 

 

 

<igDP:Field Name="line2">

 

 

 

<igDP:Field.Settings>

 

 

 

 

 

 

<igDP:FieldSettings CellMaxWidth="1000" CellMinWidth="300" CellWidth="{Binding ElementName=slider1, Path=Value}" LabelMaxWidth="1000" LabelMinWidth="300" LabelWidth="{Binding ElementName=slider1, Path=Value}" Width="{Binding ElementName=slider1, Path=Value}" />

 

 

 

 

</igDP:Field.Settings>

 

 

 

</igDP:Field>

<igDP:Field Name="line1" />

 

 

</igDP:FieldLayout.Fields>

and my slider

<Slider Margin="12,12,12,0" Name="slider1" Height="22" VerticalAlignment="Top" Maximum="1000" Minimum="300" SmallChange="20" LargeChange="100" Value

="450" />

I hope my question is somewhat clear. I just want a way to resize one field through a binding with a slider value at runtime. Is this possible in the grid?