<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"auto"
/>
<
RowDefinition
Height
=
"*"
/>
<
RowDefinition
Height
=
"auto"
/>
</
Grid.RowDefinitions
>
<
Button
Content
=
"test1"
/>
<
GroupBox
Grid.Row
=
"1"
Header
=
"test2"
/>
<
Button
Grid.Row
=
"2"
Content
=
"test3"
/>
</
Grid
>
When you place this inside the DataTemplate of a RadDataForm, the middle doesn't get stretched.
How is it possible to stretch the middle inside a RadDataForm?
Thank you!
5 Answers, 1 is accepted
0
Hello Vincent,
Thank you for contacting us!
You may predefine the template of RadDataForm and alter the specified StackPanel, that holds
AutoGeneratedFieldsPresenter and FieldsContentPresenter for manually defined templates, as follows:
Hope this helps!
Regards,
Vanya Pavlova
Telerik
Thank you for contacting us!
You may predefine the template of RadDataForm and alter the specified StackPanel, that holds
AutoGeneratedFieldsPresenter and FieldsContentPresenter for manually defined templates, as follows:
<
ScrollViewer
x:Name
=
"PART_ItemsScrollViewer"
IsTabStop
=
"False"
telerik:StyleManager.Theme
=
"{StaticResource Theme}"
ScrollViewer.HorizontalScrollBarVisibility
=
"Auto"
ScrollViewer.VerticalScrollBarVisibility
=
"Auto"
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"auto"
/>
<
RowDefinition
Height
=
"auto"
/>
</
Grid.RowDefinitions
>
<
dataForm:AutoGeneratedFieldsPresenter
x:Name
=
"PART_AutoGeneratedFieldsPresenter"
AutoGenerateFields
=
"{Binding AutoGenerateFields,RelativeSource={RelativeSource TemplatedParent}}"
telerik:StyleManager.Theme
=
"{StaticResource Theme}"
/>
<
ContentPresenter
x:Name
=
"PART_FieldsContentPresenter"
Grid.Row
=
"1"
/>
</
Grid
>
</
ScrollViewer
>
Hope this helps!
Regards,
Vanya Pavlova
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0

ks
Top achievements
Rank 1
answered on 15 Jan 2014, 04:33 PM
Hello
Thank you for the reply, but I do not understand fully what you mean and how it should be implemented.
Is it possible to clarify this further?
Thank you!
0
Hi Vincent,
I am attaching you small sample demo, which illustrates how to modify the default template of RadDataForm in order to achieve the desired result. I have also modified the second row definition to use star sizing instead of auto height definition.
Please check the attached project and let us know, how it corresponds to your needs.
Regards,
Vanya Pavlova
Telerik
I am attaching you small sample demo, which illustrates how to modify the default template of RadDataForm in order to achieve the desired result. I have also modified the second row definition to use star sizing instead of auto height definition.
Please check the attached project and let us know, how it corresponds to your needs.
Regards,
Vanya Pavlova
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0

ks
Top achievements
Rank 1
answered on 15 Jan 2014, 08:03 PM
Hello
Thank you, this works perfectly.
A small question: I see that the bar (with the ok and cancel button) has a fixed color and the background of the RadDataForm. How can I change this so that it is adapted to the theme that has been chosen (such as the standard) ?
Thank you!
Thank you, this works perfectly.
A small question: I see that the bar (with the ok and cancel button) has a fixed color and the background of the RadDataForm. How can I change this so that it is adapted to the theme that has been chosen (such as the standard) ?
Thank you!
0
Hello Vincent,
Thank you for getting back to us! Ok and Cancel buttons are part of RadDataForm's footer. Since the styles and their resources used in our themes are theme specific (you have a separate style for each theme) you should modify the template for the desired theme and switch it at runtime, as described here.
Regards,
Vanya Pavlova
Telerik
Thank you for getting back to us! Ok and Cancel buttons are part of RadDataForm's footer. Since the styles and their resources used in our themes are theme specific (you have a separate style for each theme) you should modify the template for the desired theme and switch it at runtime, as described here.
Regards,
Vanya Pavlova
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>