TreeListView.EditFormDialogServiceTemplate Property
Specifies a data template that contains a service to display an Edit Form dialog window. This is a dependency property.
Namespace: DevExpress.Xpf.Grid
Assembly: DevExpress.Xpf.Grid.v24.2.dll
NuGet Package: DevExpress.Wpf.Grid.Core
Declaration
Property Value
Type | Description |
---|---|
DataTemplate | A DataTemplate object. |
Remarks
The EditFormDialogServiceTemplate
must contain a ServiceBase class descendant that implements the IDialogService interface. The default template contains the DialogService object.
The EditFormDialogServiceTemplate
property is in effect only when you set the TreeListView.EditFormShowMode property to Dialog
.
The following code sample uses the EditFormDialogServiceTemplate
to customize the Edit Form dialog window and make it resizable:
<dxg:GridControl.View>
<dxg:TreeListView EditFormShowMode="Dialog">
<dxg:TreeListView.EditFormDialogServiceTemplate>
<DataTemplate>
<ContentControl>
<dx:DialogService>
<dx:DialogService.ViewTemplate>
<DataTemplate>
<dxg:PopupEditFormContainer
Content="{Binding}"
dxg:DataControlBase.ActiveView="{Binding Source.View}"
ContentTemplate="{Binding Path=Source.View.EditFormTemplate}"
KeyboardNavigation.IsTabStop="False"/>
</DataTemplate>
</dx:DialogService.ViewTemplate>
<dx:DialogService.DialogStyle>
<Style TargetType="{x:Type dx:ThemedWindow}">
<Setter Property="ShowInTaskbar" Value="False"/>
<Setter Property="WindowStyle" Value="ToolWindow"/>
<Setter Property="ShowIcon" Value="False"/>
<Setter Property="UseLayoutRounding" Value="True"/>
<Setter Property="Width" Value="900"/>
<Setter Property="ResizeMode" Value="CanResizeWithGrip"/>
<Setter Property="SizeToContent" Value="Height"/>
<!-- Hides the default Update and Cancel buttons: -->
<Setter Property="dxci:ThemedWindowOptions.UseCustomDialogFooter" Value="True"/>
</Style>
</dx:DialogService.DialogStyle>
</dx:DialogService>
</ContentControl>
</DataTemplate>
</dxg:TreeListView.EditFormDialogServiceTemplate>
</dxg:TreeListView>
</dxg:GridControl.View>
Refer to the following help topics for more information: DialogService and Edit Form.