public override void OnApplyTemplate()
{
base.OnApplyTemplate();
Grid parent = this.Parent as Grid;
//TextFilterMenu = parent.FindName("TextFilterMenu") as SuperMenuItem;
//ColorFilterMemu = parent.FindName("ColorFilterMemu") as SuperMenuItem;
CancelButton = parent.FindName("CancelButton") as Button;
//TextFilterMenu.Click += new RoutedEventHandler(TextFilterMenu_Click);
ColumnDropDownList cddl = ViewTreeHelper.GetParentObject<ColumnDropDownList>(this, null);
DropDownItemControl asc = cddl.Items[0] as DropDownItemControl;
asc.Content = "升序";
DropDownItemControl desc = cddl.Items[1] as DropDownItemControl;
desc.Content = "降序";
//DropDownItemControl ddlc= new DropDownItemControl();
//ddlc.Content = "test";
//cddl.Items.Add( ddlc);
//GcSpreadSheet ss = this.DataContext as GcSpreadSheet;
//FillCost fillCost = ((Grid)(ss.Parent)).Parent as FillCost;
//if (fillCost != null)
//{
//}
CancelButton.Content = "取消";
}
|