I would like to have 4 datafroms bellow each other that will esentially look as there is only one.
I have tried setting the border property to 0 but i still see the lines. I think it is in fact the header. I put nothing inside the header but i think it leaves a little thick line.
Any way of removing that?
<
telerik:RadDataForm
x:Name
=
"RadClientDetails"
CurrentItem
=
"{Binding SelectedOrganisation}"
AutoGenerateFields
=
"True"
BeginningEdit
=
"RadClientDetails_BeginningEdit"
CommandButtonsVisibility
=
"Edit"
BorderThickness
=
"0"
/>
<
telerik:RadDataForm
x:Name
=
"RadOfficeAddress"
CurrentItem
=
"{Binding PrimaryAddress}"
AutoGenerateFields
=
"True"
CommandButtonsVisibility
=
"None"
BorderThickness
=
"0"
/>
<
telerik:RadDataForm
x:Name
=
"RadOfficeFax"
CurrentItem
=
"{Binding PrimaryFaxNumber}"
AutoGenerateFields
=
"True"
CommandButtonsVisibility
=
"Commit,Cancel"
EditEnded
=
"RadOfficeFax_EditEnded"
BorderThickness
=
"0"
/>
6 Answers, 1 is accepted
As far as I can understand you need a completely "borderless" controls over each other.
I have tried to replicate such a behavior by my side, but I am not sure for which Border element you are talking about. If you create a style targeted at RadDataForm and set its BorderThickness property to 0, the outer border will be removed. Looking at the template structure of RadDataForm you may see a CollectionNavigator control which has a specified BorderThickness. You may remove its Border in a similar way using a simple style. In any other case you should edit the template of RadDataForm and remove these borders by your side.
Once you have created an implict style targeted at RadDataForm it will be applied to all forms in your application.
I am attaching you sample application which I used for testing.
I look forward to hearing from you!
Vanya Pavlova
the Telerik team
Almost there, but it still appears to leave a line in between the controls.
How can i get rid of that?
Thanks.
As I tried to propose in my previous reply if a simple style targeted either at RadDataForm or at CollectionNavigator does not satisfy your personall requirements you have to edit the template of RadDataForm. This border comes from an element around ItemsScrollViewer, just remove it and it will dissappear:
<
ScrollViewer
x:Name
=
"PART_ItemsScrollViewer"
Grid.Row
=
"2"
ScrollViewer.HorizontalScrollBarVisibility
=
"Auto"
IsTabStop
=
"False"
telerik:StyleManager.Theme
=
"{StaticResource Theme}"
ScrollViewer.VerticalScrollBarVisibility
=
"Auto"
>
<
StackPanel
Orientation
=
"Vertical"
>
<
Telerik_Windows_Controls_Data_DataForm:AutoGeneratedFieldsPresenter
x:Name
=
"PART_AutoGeneratedFieldsPresenter"
AutoGenerateFields
=
"{Binding AutoGenerateFields, RelativeSource={RelativeSource TemplatedParent}}"
CurrentItem
=
"{Binding CurrentItem}"
telerik:StyleManager.Theme
=
"{StaticResource Theme}"
/>
<
ContentPresenter
x:Name
=
"PART_FieldsContentPresenter"
Content
=
"{Binding CurrentItem}"
/>
</
StackPanel
>
</
ScrollViewer
>
Vanya Pavlova
the Telerik team
It is the box where the Commit and Cancel buttons reside.
The CollectionNavigator from your code removes the border from the top part of the DataForm
The regular border thickness removes the border around the whole control.
But there appears to be a border or just one line around the footer where the buttons sit.
What is the area called and how can i assign the border thickness to zero for that area?
This is the border element around the PART_ItemsScrollViewer just remove the border, but the style targeted at CollectionNavigator remains. Please find attached sample project that demonstrates how this can be achieved.
Best wishes,
Vanya Pavlova
the Telerik team
Thank you for this.
It seems to me like a lot of code to remove one border.