0
Answer

Custom control derived from DataGrid

Nitsan Selinger

Nitsan Selinger

13y
1.4k
1
 trying to create a custom control derived from DataGrid.
At this point I want to have the same fuctionalaty as DataGrid.

I created A Custom Control derived from DataGrid:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace ZivControls
{
    
    public class ZivGrid : DataGrid
    {
        static ZivGrid()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(ZivGrid), new FrameworkPropertyMetadata(typeof(ZivGrid)));
        }
        
    }
}


Can someone please write the Generic.xaml so that the new custom control will have the same fuctionalaty as DataGrid.



Next Recommended Forum