[Batch #1](https://hackmd.io/cnj-xPiQTXODrhRQqPXClw?both=)
[Batch #2](https://hackmd.io/JHsvltWERUGMFO3nwWxHbg?view=)
# XPF Diagnostics - Batch #3
# Returning
## Grid
### [Done] GridColumns generated from a bound collection do not use the attached DependencyObjectExtensions.DataContext property in data bindings
||Description|
|-|-|
|Severity|Warning|
|False positives|-> 0%|
|Builds|All|
|Documentation|[How to: Bind the Grid to a Collection of Columns](https://docs.devexpress.com/WPF/10121/controls-and-libraries/data-grid/examples/mvvm-enhancements/binding-to-a-collection-of-columns)|
|Criteria|`GridColumn` placed in [ColumnGeneratorTemplate](https://docs.devexpress.com/WPF/DevExpress.Xpf.Grid.DataControlBase.ColumnGeneratorTemplate) or used in a template for [ColumnGeneratorTemplateSelector](https://docs.devexpress.com/WPF/DevExpress.Xpf.Grid.DataControlBase.ColumnGeneratorTemplateSelector) has one of its properties bound without using the attached `DependencyObjectExtensions.DataContext` property.|
|Description|We recommend using the attached DependencyObjectExtensions.DataContext property to bind generated columns' properties for better performance.|
|Status|CRXPF0010 - Ready to test in daily CodeRush build.|
```xaml
//issue1
<dxg:GridControl ColumnsSource="...">
<dxg:GridControl.ColumnGeneratorTemplate>
<DataTemplate>
<dxg:GridColumn FieldName="{Binding FieldName}"/>
</DataTemplate>
</dxg:GridControl.ColumnGeneratorTemplate>
</dxg:GridControl>
//issue2
<dxg:GridControl ColumnsSource="...">
<dxg:GridControl.ColumnGeneratorTemplateSelector>
<local:MyColumnTemplateSelector>
<local:MyColumnTemplateSelector.SomeColumnTemplate>
<DataTemplate>
<dxg:GridColumn FieldName="{Binding FieldName}"/>
</DataTemplate>
</local:MyColumnTemplateSelector.SomeColumnTemplate>
</local:MyColumnTemplateSelector>
</dxg:GridControl.ColumnGeneratorTemplate>
</dxg:GridControl>
//OK1
<dxg:GridControl ColumnsSource="...">
<dxg:GridControl.ColumnGeneratorTemplate>
<DataTemplate>
<dxg:GridColumn FieldName="{Binding Path=(dxci:DependencyObjectExtensions.DataContext).FieldName, RelativeSource={RelativeSource Self}}"/>
</DataTemplate>
</dxg:GridControl.ColumnGeneratorTemplate>
</dxg:GridControl>
//OK2
<dxg:GridControl ColumnsSource="...">
<dxg:GridControl.ColumnGeneratorTemplateSelector>
<local:MyColumnTemplateSelector>
<local:MyColumnTemplateSelector.SomeColumnTemplate>
<DataTemplate>
<dxg:GridColumn FieldName="{Binding Path=(dxci:DependencyObjectExtensions.DataContext).FieldName, RelativeSource={RelativeSource Self}}"/>
</DataTemplate>
</local:MyColumnTemplateSelector.SomeColumnTemplate>
</local:MyColumnTemplateSelector>
</dxg:GridControl.ColumnGeneratorTemplate>
</dxg:GridControl>
// I assume issue?
<Window.Resources>
<DataTemplate x:Key="DefaultColumnTemplate">
<dxg:GridColumn FieldName="{Binding FieldName}"/>
</DataTemplate>
</Window.Resources>
<dxg:GridControl ColumnsSource="{Binding Columns}"
ColumnGeneratorTemplate="{StaticResource DefaultColumnTemplate}"/>
// I assume ok?
<Window.Resources>
<DataTemplate x:Key="DefaultColumnTemplate">
<dxg:GridColumn FieldName="{Binding Path=(dxci:DependencyObjectExtensions.DataContext).FieldName, RelativeSource={RelativeSource Self}}"/>
</DataTemplate>
</Window.Resources>
<dxg:GridControl ColumnsSource="{Binding Columns}"
ColumnGeneratorTemplate="{StaticResource DefaultColumnTemplate}"/>
// I assume 2 issues?
<Window.Resources>
<DataTemplate x:Key="DefaultColumnTemplate">
<dxg:GridColumn FieldName="{Binding FieldName}"/>
</DataTemplate>
<DataTemplate x:Key="LookupColumnTemplate">
<dxg:GridColumn FieldName="{Binding FieldName}">
<dxg:GridColumn.EditSettings>
<dxe:ComboBoxEditSettings ItemsSource="{Binding Source}"/>
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
</DataTemplate>
<local:ColumnTemplateSelector x:Key="ColumnTemplateSelector"
DefaultColumnTemplate ="{StaticResource DefaultColumnTemplate}"
LookupColumnTemplate ="{StaticResource LookupColumnTemplate}"/>
</Window.Resources>
<dxg:GridControl ItemsSource="{Binding Source}"
ColumnsSource="{Binding Columns}"
ColumnGeneratorTemplateSelector="{StaticResource ColumnTemplateSelector}"/>
// I assume ok?
<Window.Resources>
<DataTemplate x:Key="DefaultColumnTemplate">
<dxg:GridColumn FieldName="{Binding Path=(dxci:DependencyObjectExtensions.DataContext).FieldName, RelativeSource={RelativeSource Self}}"/>
</DataTemplate>
<DataTemplate x:Key="LookupColumnTemplate">
<dxg:GridColumn FieldName="{Binding Path=(dxci:DependencyObjectExtensions.DataContext).FieldName, RelativeSource={RelativeSource Self}}">
<dxg:GridColumn.EditSettings>
<dxe:ComboBoxEditSettings ItemsSource="{Binding Source}"/>
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
</DataTemplate>
<local:ColumnTemplateSelector x:Key="ColumnTemplateSelector"
DefaultColumnTemplate ="{StaticResource DefaultColumnTemplate}"
LookupColumnTemplate ="{StaticResource LookupColumnTemplate}"/>
</Window.Resources>
<dxg:GridControl ItemsSource="{Binding Source}"
ColumnsSource="{Binding Columns}"
ColumnGeneratorTemplateSelector="{StaticResource ColumnTemplateSelector}"/>
```
### [Done] Columns without FieldName or Binding
||Description|
|-|-|
|Severity|Warning|
|False positives|-> 10%|
|Builds|All|
|Documentation|[Binding Columns to Data Source Fields](https://docs.devexpress.com/WPF/120400/controls-and-libraries/data-grid/grid-view-data-layout/columns-and-card-fields/binding-columns-to-data-source-fields)|
|Criteria|`GridColumn` is declared without using the `FieldName` or `Binding` properties.|
|Description|This column is not bound to a data field. Consider using the FieldName or Binding property to automatically connect the column to data.|
|Status|CRXPF0011- Ready in separate branch.|
```xaml
//issue
<dxg:GridColumn />
//OK1
<dxg:GridColumn FieldName="..." />
//OK2
<dxg:GridColumn Binding="{Binding ...}" />
```
### [Done] Columns with Binding are read-only by default
||Description|
|-|-|
|Severity|Info|
|False positives|-> 30%|
|Builds|All|
|Documentation|[Binding Columns to Data Source Fields](https://docs.devexpress.com/WPF/120400/controls-and-libraries/data-grid/grid-view-data-layout/columns-and-card-fields/binding-columns-to-data-source-fields)|
|Criteria|The `DevExpress.Xpf.Grid.ColumnBase.Binding` property is used.|
|Description|Columns bound to data using the Binding property are read-only by default. Set the binding’s Mode property to TwoWay to enable editing.|
|Status|CRXPF0012 - both XAML and C# parts ready in separate branch.|
```xaml
//issue
<dxg:GridColumn Binding="{Binding X}" />
//OK
<dxg:GridColumn Binding="{Binding X, Mode=TwoWay}" />
//OK
<dxg:GridColumn Binding="{Binding X, Mode=OneWay}" />
```
```cs
//issue
_gridColumn.Binding = new Binding("X");
//OK
_gridColumn.Binding = new Binding() { Path = "X", Mode = BindingMode.TwoWay };
```
### [Done] A collection of the ObservableCollectionCore type is modified in code
||Description|
|-|-|
|Severity|Info|
|False positives|-> 30%|
|Builds|All|
|Criteria|A collection of type `ObservableCollectionCore` is modified in code.|
|Description|We recommend calling the BeginUpdate and EndUpdate methods to process updates in batches for the {PropertyName} property.|
|Status|CRXPF0013 - *Missing EndUpdate* ready in separate branch, CRXPF0014 - *Missing BeginUpdate* ready in separate branch|
```cs
//issue1
for ... || foreach ... || while ... || any cycle
_gridControl.Columns.Add(new ...);
//issue2
_gridControl.Columns.Add(new ...);
_gridControl.Columns.Add(new ...);
_gridControl.Columns.Remove(_someColumn);
...
//OK1
_gridControl.Columns.BeginUpdate();
for ... || foreach ... || while ... || any cycle
_gridControl.Columns.Add(new ...);
_gridControl.Columns.EndUpdate();
//OK2
_gridControl.Columns.BeginUpdate();
_gridControl.Columns.Add(new ...);
_gridControl.Columns.Add(new ...);
_gridControl.Columns.Remove(_someColumn);
...
_gridControl.Columns.EndUpdate();
```
## Misc
### [Priority 3][CHECKED] DXMessageBox is outdated
||Description|
|-|-|
|Severity|Warning|
|False positives|-> 0%|
|Builds|18.2+|
|Documentation|[DXMessageBox](https://docs.devexpress.com/WPF/DevExpress.Xpf.Core.DXMessageBox?p=netframework)|
|Criteria|The `DXMessageBox` type is used (`DXMessageBoxService` is OK).|
|Description|DXMessageBox is outdated. Use ThemedMessageBox instead.|
|Status|TODO|
```cs
// issue
DXMessageBox.Show(caption: "Dialog Header", messageBoxText: "This is your message", button: MessageBoxButton.OKCancel, icon: MessageBoxImage.Exclamation);
// OK
IMessageBoxService MessageBoxService { get { return GetService<IMessageBoxService>(ServiceSearchMode.PreferParents); } }
void ShowMessage() {
MessageBoxService.Show("This is ChildView");
}
```
### [Priority 3][CHECKED] DXSplashScreen and DXSplashScreenService are outdated
||Description|
|-|-|
|Severity|Warning|
|False positives|-> 0%|
|Builds|20.1+|
|Documentation|[DXSplashScreen](https://docs.devexpress.com/WPF/9952/controls-and-libraries/windows-and-utility-controls/dxsplashscreen/how-to-manually-invoke-dxsplashscreen), [DXSplashScreenService](https://docs.devexpress.com/WPF/18198/mvvm-framework/services/predefined-set/dxsplashscreenservice)|
|Criteria|The `DXSplashScreen` or `DXSplashScreenService` type is used.|
|Text|This splash screen type is outdated. Use SplashScreenManager/SplashScreenManagerService instead.|
|Status|TODO|
```cs
//issue
DXSplashScreen.Show<T>();
//OK
DXSplashScreenManager.CreateThemed().Show();
```
# New
## Grid
### [Priority 7][CHECKED] A detail grid calls PopuplateColumns or its Columns collection is changed
||Description|
|-|-|
|Severity|Error|
|False positives|-> 0%|
|Builds|All|
|Criteria|[OwnerDetailDescriptor](https://docs.devexpress.com/WPF/DevExpress.Xpf.Grid.DataControlBase.OwnerDetailDescriptor) is not null. The [PopulateColumns]() method is called. The [Columns](https://docs.devexpress.com/WPF/DevExpress.Xpf.Grid.GridControl.Columns) property is used to call `Add`, `AddRange`, `Clear`, etc.|
|Description|Detail grids cannot change their column collections at runtime. Create a new instance of DetailDescriptor to re-populate columns.|
|Status|TODO|
```csharp
//issue1
_gridControl.GetDetail(0).PopulateColumns();
//issue2
_gridControl.GetVisibleDetail(0).Columns.RemoveAt(0);
//OK
_gridControl.DetailDescriptor = new DataControlDetailDescriptor() { ... }; //create a new grid with columns there
```
### [Priority 6][CHECKED] NewItemRowPosition is used, but the source item does not have the default public constructor
||Description|
|-|-|
|Severity|Error|
|False positives|-> 0%|
|Builds|All|
|Documentation|[New Item Row](https://docs.devexpress.com/WPF/6123/controls-and-libraries/data-grid/data-editing-and-validation/add-and-remove-rows#new-item-row)|
|Criteria|Item type used in `GridControl`'s `ItemsSource` does not have a public parameterless constructor. [TableView.NewItemRowPosition](https://docs.devexpress.com/WPF/DevExpress.Xpf.Grid.TableView.NewItemRowPosition) or [TreeListView.NewItemRowPosition](https://docs.devexpress.com/WPF/DevExpress.Xpf.Grid.TreeListView.NewItemRowPosition) is set to `Top` or `Bottom`. The [TableView.AddNewRow](https://docs.devexpress.com/WPF/DevExpress.Xpf.Grid.TableView.AddNewRow(System.Boolean)) or [TreeListView.AddNewNode](https://docs.devexpress.com/WPF/DevExpress.Xpf.Grid.TreeListView.AddNewNode.overloads) method is called. |
|Description|Your data items do not have the default public constructor. GridControl cannot create a new instance of such an item. Handle the [AddingNewRow](https://docs.devexpress.com/WPF/DevExpress.Xpf.Grid.GridViewBase.AddingNewRow)/[AddingNewNode](https://docs.devexpress.com/WPF/DevExpress.Xpf.Grid.TreeListView.AddingNewNode) event to initialize new items.|
|Status|TODO|
```cs
//BindingListAdapterBase source type detection
private Type GetRowType()
{
if (this.GetRowTypeCustom != null)
{
Type rowType = this.GetRowTypeCustom();
if (rowType != (Type) null)
return rowType;
}
bool isGenericIListRowType = false;
Type rowType1 = ListDataControllerHelper.GetRowType(((DevExpress.Data.IListWrapper) this).WrappedListType, out isGenericIListRowType);
if (rowType1 == (Type) null && this.Count > 0 && this.IsItemLoaded(0))
return this[0].GetType();
if (rowType1 == (Type) null && this.OriginalDataSource != null)
rowType1 = DesktopCore.Instance.CollectionViewGetRowType(this.OriginalDataSource);
return rowType1;
}
```
```xaml
//common
<dxg:GridControl ItemsSource="{Binding Items}">
<dxg:TableView NewItemRowPosition="Bottom" />
```
```cs
//common
_tableView.AddNewRow();
```
```cs
//issue1
public class Item {
public Item(int id) {}
}
//issue2
public class Item {
private Item() {}
}
//OK1
public class Item {
public Item() {}
}
//OK2
public class Item {}
```
### [Priority 3][CHECKED] GridControl in LookUpEdit.PopupContentTemplate is not named "PART_GridControl"
||Description|
|-|-|
|Severity|Warning|
|False positives|-> 10%|
|Builds|All|
|Documentation|[PopupContentTemplate](https://docs.devexpress.com/WPF/DevExpress.Xpf.Editors.PopupBaseEdit.PopupContentTemplate)|
|Criteria|`GridControl` placed in [LookUpEdit.PopupContentTemplate](https://docs.devexpress.com/WPF/DevExpress.Xpf.Editors.PopupBaseEdit.PopupContentTemplate) does not have its `Name` (`x:Name`) set to "PART_GridControl".|
|Description|Set GridControl's Name to "PART_GridControl" to automatically connect it to the editor's data.|
|Status|TODO|
```xaml
//issue
<dxg:LookUpEdit>
<dxg:LookUpEdit.PopupContentTemplate>
<ControlTemplate>
<dxg:GridControl ... />
</ControlTemplate>
</dxg:LookUpEdit.PopupContentTemplate>
</dxg:LookUpEdit>
//OK
<dxg:LookUpEdit>
<dxg:LookUpEdit.PopupContentTemplate>
<ControlTemplate>
<dxg:GridControl x:Name="PART_GridControl" />
</ControlTemplate>
</dxg:LookUpEdit.PopupContentTemplate>
</dxg:LookUpEdit>
```
### [Priority 3][CHECKED] GridColumn.SortMode is set to Custom, but SortOrder is not used and/or there is no handler for the CustomColumnSort event
||Description|
|-|-|
|Severity|Warning|
|False positives|-> 10%|
|Builds|All|
|Documentation|[Custom Sorting](https://docs.devexpress.com/WPF/6142/controls-and-libraries/data-grid/sorting/sorting-modes-and-custom-sorting#custom-sorting)|
|Criteria|The [ColumnBase.SortMode](https://docs.devexpress.com/WPF/DevExpress.Xpf.Grid.ColumnBase.SortMode) property is set to `Custom`. The [ColumnBase.SortOrder](https://docs.devexpress.com/WPF/DevExpress.Xpf.Grid.ColumnBase.SortOrder) property is not set. There is no handler for the [CustomColumnSort](https://docs.devexpress.com/WPF/DevExpress.Xpf.Grid.GridControl.CustomColumnSort) event.|
|Description|To enable custom sorting, change the column's SortOrder and handle the CustomColumnSort event.|
|Status|TODO|
```xaml
//issue1
<dxg:GridControl CustomColumnSort="...">
<dxg:GridColumn SortMode="Custom" />
//issue2
<dxg:GridControl>
<dxg:GridColumn SortMode="Custom" SortOrder="Ascending"/>
//issue3
<dxg:GridControl CustomColumnSort="...">
<dxg:GridControl.Resources>
<Style TargetType="{x:Type dxg:GridColumn}">
<Setter Property="SortMode" Value="Custom" />
//OK1
<dxg:GridControl CustomColumnSort="...">
<dxg:GridColumn SortMode="Custom" SortOrder="Ascending" />
//OK2
<dxg:GridControl CustomColumnSort="...">
<dxg:GridControl.Resources>
<Style TargetType="{x:Type dxg:GridColumn}">
<Setter Property="SortMode" Value="Custom" />
<Setter Property="SortOrder" Value="Ascending" />
```
### [Priority 5][CHECKED] The TreeDerivationMode property is used with incompatible properties
||Description|
|-|-|
|Severity|Warning|
|False positives|-> 0%|
|Builds|All|
|Documentation|[TreeDerivationMode](https://docs.devexpress.com/WPF/DevExpress.Xpf.Grid.TreeListView.TreeDerivationMode)|
|Criteria|`TreeDerivationMode` is explicitly set. User sets properties that have no effect with the choosen `TreeDerivationMode` value.|
|Description|The {PropertyName} property has no effect when TreeDerivationMode is set to {Value}.|
|Status|TODO|
```xaml
//issue1
<dxg:TreeListView TreeDerivationMode="SelfReference" ChildNodesSelector="..." />
//issue2
<dxg:TreeListView TreeDerivationMode="ChildNodesSelector" ParentId="..."/>
//OK1
<dxg:TreeListView TreeDerivationMode="ChildNodesSelector" />
//OK2
<dxg:TreeListView TreeDerivationMode="ChildNodesSelector" ChildNodesPath="..." />
//OK3
<dxg:TreeListView ParentId="..."/>
```
## Editors
### [Priority 2][CHECKED] Editors bind "value" properties instead of EditValue
||Description|
|-|-|
|Severity|Information|
|False positives|-> 40%|
|Builds|All|
|Documentation|[EditValue](https://docs.devexpress.com/WPF/DevExpress.Xpf.Editors.BaseEdit.EditValue)|
|Criteria|The following properties use `Binding`: [TextEditBase.Text](https://docs.devexpress.com/WPF/DevExpress.Xpf.Editors.TextEditBase.Text), [SpinEdit.Value](https://docs.devexpress.com/WPF/DevExpress.Xpf.Editors.SpinEdit.Value), [RangeBaseEdit.Value](https://docs.devexpress.com/WPF/DevExpress.Xpf.Editors.RangeBaseEdit.Value), [DateEdit.DateTime](https://docs.devexpress.com/WPF/DevExpress.Xpf.Editors.DateEdit.DateTime).|
|Description|We recommend using the EditValue property to bind an editor to a value. The property is strongly-typed, so you need to take the bound value type into account. EditValue is of the object type, so you can bind it to any object and the editor will try to convert the result to the required type.|
|Status|TODO|
```xaml
//issue1
<dxe:TextEdit Text="{Binding ...}" />
//issue2
<dxe:ButtonEdit Text="{Binding ...}" />
//issue3
<dxe:SpinEdit Value="{Binding ...}" />
//OK1
<dxe:TextEdit EditValue="{Binding ...}" />
//OK2
<dxe:ButtonEdit EditValue="{Binding ...}" />
//OK3
<dxe:SpinEdit EditValue="{Binding ...}" />
```
### [Priority 2][CHECKED] ApplyItemTemplateToSelectedItem is enabled, but IsTextEditable is set to true
||Description|
|-|-|
|Severity|Warning|
|False positives|-> 0%|
|Builds|All|
|Documentation|[ApplyItemTemplateToSelectedItem](https://docs.devexpress.com/WPF/DevExpress.Xpf.Editors.LookUpEditBase.ApplyItemTemplateToSelectedItem)|
|Criteria|[ApplyItemTemplateToSelectedItem](https://docs.devexpress.com/WPF/DevExpress.Xpf.Editors.LookUpEditBase.ApplyItemTemplateToSelectedItem) is set to `true`. [IsTextEditable](https://docs.devexpress.com/WPF/DevExpress.Xpf.Editors.ButtonEdit.IsTextEditable) is set to `true`.|
|Description|The ApplyItemTemplateToSelectedItem property takes effect only if the editor's text cannot be edited. Disable the IsTextEditable option to apply the template.|
|Status|TODO|
```xaml
//issue1
<dxe:LookUpEdit ApplyItemTemplateToSelectedItem="True" IsTextEditable="True" />
//issue2
<Style TargetType="dxe:ComboBoxEdit">
<Setter Property="ApplyItemTemplateToSelectedItem" Value="True" />
<Setter Property="IsTextEditable" Value="True" />
</Style>
//OK1
<dxe:LookUpEdit ApplyItemTemplateToSelectedItem="True" />
//OK2
<Style TargetType="dxe:ComboBoxEdit">
<Setter Property="ApplyItemTemplateToSelectedItem" Value="True" />
<Setter Property="IsTextEditable" Value="False" />
</Style>
```
## Misc
### [Priority 7][CHECKED] DataContext is set manually for views created by the view creation logic (dialogs and other similar services)
||Description|
|-|-|
|Severity|Info|
|False positives|-> 50%|
|Builds|All|
|Documentation|[View Creation Mechanisms](https://docs.devexpress.com/WPF/17469/mvvm-framework/services/view-creation-mechanisms)|
|Criteria|`DataContext` is set for the root element inside of [ViewTemplate](https://docs.devexpress.com/WPF/DevExpress.Mvvm.UI.ViewServiceBase.ViewTemplate) of [ViewServiceBase](https://docs.devexpress.com/WPF/DevExpress.Mvvm.UI.ViewServiceBase) descendant.|
|Description|DataContext for elements located inside of ViewTemplate can be assigned automatically by the corresponding service method call. If you pass a view model object to the service in code, there is no need to set DataContext there.|
|Status|TODO|
```xaml
//issue
<dxmvvm:DialogService>
<dxmvvm:DialogService.ViewTemplate>
<DataTemplate>
<Grid DataContext="..." />
</DataTemplate>
</dxmvvm:DialogService.ViewTemplate>
</dxmvvm:DialogService>
//OK1
<dxmvvm:DialogService>
<dxmvvm:DialogService.ViewTemplate>
<DataTemplate>
<Grid />
</DataTemplate>
</dxmvvm:DialogService.ViewTemplate>
</dxmvvm:DialogService>
//OK2
<dxmvvm:DialogService>
<dxmvvm:DialogService.ViewTemplate>
<DataTemplate>
<Grid>
<Button DataContext="..." />
</Grid>
</DataTemplate>
</dxmvvm:DialogService.ViewTemplate>
</dxmvvm:DialogService>
```
### [Priority 0][CHECKED] Outdated window type
||Description|
|-|-|
|Severity|Info|
|False positives|-> 0%|
|Builds|18.2+|
|Documentation|[ThemedWindow](https://docs.devexpress.com/WPF/DevExpress.Xpf.Core.ThemedWindow)|
|Criteria|The [DXWindow](https://docs.devexpress.com/WPF/DevExpress.Xpf.Core.DXWindow) or one of its descendants is used.|
|Description|This window type is outdated. We recommend using ThemedWindow instead.|
|Status|TODO|
```xaml
//issue
<dx:DXWindow />
<dx:DXTabbedWindow />
<dxmvvm:Interaction.Behaviors>
<dxmvvm:WindowService WindowType="{x:Type dx:DXWindow}"/>
</dxmvvm:Interaction.Behaviors>
//OK
<dx:ThemedWindow WindowKind="Tabbed" />
```
```cs
//issue
var dialogResult = new DXDialog().ShowDialog();
//OK
var dialogResult = new ThemedWindow().ShowDialog();
```
## MAUI
### [CHECKED] DataGridView is measured using an infinite height value
# !!Think about exception!!
||Description|
|-|-|
|Severity|Error|
|False positives|-> 0%|
|Builds|All|
|Criteria|DataGridView is placed in a container that let's it be measured with an infinite height value. The `ReduceHeightToContent` option is disabled.|
|Description|DataGridView is measured using an infinite height value. No rows can be displayed. Use another container or enable the ReduceHeightToContent option.|
|Status|TODO|
```xaml
//issue
<StackLayout>
<dxg:DataGridView />
//OK
<Grid>
<dxg:DataGridView />
<StackLayout>
<dxg:DataGridView ReduceHeightToContent="True" />
```
### [Priority 0][CHECKED] The UseDevExpress method is not called at application startup
||Description|
|-|-|
|Severity|Error|
|False positives|-> 0%|
|Builds|All|
|Documentation|[Build Your First App](https://docs.devexpress.com/MAUI/404023/get-started/build-your-first-app)|
|Criteria|The MAUI app builder does not call the UseDevExpress method.|
|Description|Your MAUI application builder does not call the UseDevExpress method. Call this method to register handlers for our components.|
|Status|TODO|
```cs
//issue
public static MauiApp CreateMauiApp() {
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
return builder.Build();
}
//OK
public static MauiApp CreateMauiApp() {
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.UseDevExpress()
return builder.Build();
}
```
# Rejected
## Grid
### [REJECTED - NO DEMAND] ChildNodesSelector is slower than ChildNodesPath
||Description|
|-|-|
|Builds|All|
|Criteria|The `TreeListView.ChildNodesSelector` property is used|
|Description|ChildNodesSelector works more slowly than ChildNodesPath. Use ChildNodesPath instead if a property with child items has the same name for all objects.|
### [REJECTED - NO DEMAND] SelectionMode=Row (this is the multi-selection mode as well)
||Description|
|-|-|
|Builds|All|
|Criteria|`DevExpress.Xpf.Grid.DataControlBase.SelectionMode` is set to `Row`|
|Description|In this mode, users can select multiple rows. If you need the single selection mode, set SelectionMode to None|
## Misc
### [REJECTED - UNCLEAR USE CASES] AncestorType bindings
||Description|
|-|-|
|Severity|Info|
|False positives|-> 70%|
|Builds|All|
|Criteria|A data binding utilizes `AncestorType` in DX products.|
|Description|The use of AncestorType may be not reliable. We recommend using special attached properties, such as dxe:BaseEdit.OwnerEdit, and RelativeSource Self if possible.|
```xaml
//issue
PropertyName="{Binding RelativeSource={RelativeSource AncestorType=dxg:DataViewBase}}"
PropertyName="{Binding RelativeSource={RelativeSource AncestorType=dxe:TextEdt}}"
//OK
PropertyName="{Binding RelativeSource={RelativeSource Self}, Path=(dxg:DataControlBase.ActiveView)}"
PropertyName="{Binding RelativeSource={RelativeSource Self}, Path=(dxe:BaseEdit.OwnerEdit)}"
```
# TEMPLATE
## Subject [check with correctors]
||Description|
|-|-|
|Priority|Low/Average/High|
|Severity|Error/Warning/Info|
|False positives|-> 0%|
|Builds|All|
|Documentation|LINK|
|Criteria||
|Description|Check description with correctors|
*Code Snippets*