Nitsan Selinger

Nitsan Selinger

  • NA
  • 1
  • 1.7k

Custom control derived from DataGrid

Jun 19 2011 11:33 AM
 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.