void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.root = ((WpfApplication2.MainWindow)(target)); #line 5 "..\..\MainWindow.xaml" this.root.Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden return; case 2: this.transactionsDataGrid = ((System.Windows.Controls.DataGrid)(target)); return; case 3: this.amountColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 4: this.dateColumn = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 5: this.payeeColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 6: this.tagColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 7: this.amountTextBox = ((System.Windows.Controls.TextBox)(target)); return; case 8: this.dateDatePicker = ((System.Windows.Controls.DatePicker)(target)); return; case 9: this.payeeTextBox = ((System.Windows.Controls.TextBox)(target)); return; case 10: this.tagTextBox = ((System.Windows.Controls.TextBox)(target)); return; case 11: this.nameColumn1 = ((System.Windows.Controls.GridViewColumn)(target)); return; case 12: this.instColumn1 = ((System.Windows.Controls.GridViewColumn)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.NhapUserControl = ((QuanLyPhanPhanBon.View.Nhap.DanhSachSanPham)(target)); return; case 2: this.DataGridNhap = ((System.Windows.Controls.DataGrid)(target)); return; case 3: this.DeletePB = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 4: this.DataGridLoaiPhanBon = ((System.Windows.Controls.DataGrid)(target)); return; case 5: this.btnDelete = ((System.Windows.Controls.Button)(target)); return; case 6: this.btnAddProduct = ((System.Windows.Controls.Button)(target)); return; case 7: this.btnDeleteProduct = ((System.Windows.Controls.Button)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.Grd_cmpTable = ((System.Windows.Controls.DataGrid)(target)); return; case 2: this.Img = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 3: #line 67 "..\..\W_compareList.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Back_Click); #line default #line hidden return; case 4: #line 68 "..\..\W_compareList.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Remove_Click); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.CustomGridLinesTrailBalance = ((System.Windows.Controls.DataGrid)(target)); return; case 2: this.dg1 = ((System.Windows.Controls.DataGrid)(target)); return; case 3: this.AccountName = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 4: this.DebitBalance = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 5: this.CreditBalance = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 8 "..\..\CancelSale.xaml" ((PointOfSale.CancelSale)(target)).Loaded += new System.Windows.RoutedEventHandler(this.UserControl_Loaded); #line default #line hidden return; case 2: this.invoiceDataGrid = ((System.Windows.Controls.DataGrid)(target)); return; case 3: this.dateColumn = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 4: this.invoiceNumberColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 6: this.cancellationReasonColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 10 "..\..\..\pages\ViewSchedule.xaml" ((Clinic.pages.ViewSchedule)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Page_Loaded); #line default #line hidden return; case 2: this.doctor_scheduleDataGrid = ((System.Windows.Controls.DataGrid)(target)); return; case 3: this.endColumn = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 4: this.patientColumn = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 5: this.patientIdColumn = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 6: this.startColumn = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.Total_jus = ((System.Windows.Controls.Label)(target)); return; case 2: this.Total_abs = ((System.Windows.Controls.Label)(target)); return; case 3: this.Total_noJust = ((System.Windows.Controls.Label)(target)); return; case 4: this.deatail_abs = ((System.Windows.Controls.DataGrid)(target)); return; case 5: this.action = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 7: this.name_etud = ((System.Windows.Controls.Label)(target)); return; } this._contentLoaded = true; }
void GenerateDataGridColumns(Type type) { var list = PropertyNameValuePair.TypeToList(type); foreach (var p in list) { var pinfo = p.Value as PropertyInfo; if (pinfo.Name == "GoodsId") continue; if (pinfo.Name == "AddressCode") { var datagridcolumn = new DataGridTemplateColumn(); datagridcolumn.Header = p.Name; datagridcolumn.CellTemplate = Application.Current.Resources["addressTemplate"] as DataTemplate; goodsgrid.Columns.Add(datagridcolumn); continue; } // general var textcolumn = new DataGridTextColumn(); textcolumn.Header = p.Name; var binding = new Binding(pinfo.Name); if (pinfo.PropertyType.IsEnum) { binding.Converter = new EnumConverter(); } textcolumn.Binding = binding; goodsgrid.Columns.Add(textcolumn); } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.cbxAll2 = ((System.Windows.Controls.CheckBox)(target)); return; case 2: this.CustomGridLines = ((System.Windows.Controls.DataGrid)(target)); return; case 3: this.datagrid1 = ((System.Windows.Controls.DataGrid)(target)); return; case 4: this.userName = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 7: this.CustomGridLinesRole = ((System.Windows.Controls.DataGrid)(target)); return; case 8: this.RoleGrid = ((System.Windows.Controls.DataGrid)(target)); return; } this._contentLoaded = true; }
public DataGridColumn CreateColumnForDefinition(ColumnDefinition columnDefinition) { var cellTemplate = CreateCellTemplate(columnDefinition); DataGridColumn column; if (cellTemplate != null) { column = new DataGridTemplateColumn { ClipboardContentBinding = GetBinding(columnDefinition), Header = columnDefinition.Header, CellTemplate = cellTemplate, }; } else { column = new DataGridTextColumn { Binding = new Binding("NonExistantProperty"), Header = columnDefinition, HeaderStyle = InvalidBindingHeaderStyle, }; } if (!string.IsNullOrEmpty(columnDefinition.DefaultWidth)) { column.Width = ParseWidth(columnDefinition.DefaultWidth); } return column; }
static DocUIDataGrid() { ColDict = new Dictionary<string, GetColumn>(); ColDict.Add("string", (Binding b) => { DataGridTextColumn col = new DataGridTextColumn(); col.Binding = b; col.Width = new DataGridLength(1, DataGridLengthUnitType.Star); return col; }); ColDict.Add("combobox", (Binding b) => { DataTemplate dt = new DataTemplate(); FrameworkElementFactory templatecheckbox = new FrameworkElementFactory(typeof(ComboBox)); templatecheckbox.SetBinding(ComboBox.TextProperty, b); dt.VisualTree = templatecheckbox; DataGridTemplateColumn col = new DataGridTemplateColumn(); col.CanUserResize = false; col.CellTemplate = dt; return col; }); }
public void Initialize(DataGrid grid) { _grid = grid; ResourceDictionary dictionary = Parse(new Uri("ExtensibleGrid.Extensions;component/AutoCompleteExtension.xaml", UriKind.Relative)); //loading the resource dictionary DataGridColumn item = null; int index = 0; foreach (DataGridColumn col in _grid.Columns) { // turn every column of type string to an autocomplete if (col.Header.Equals("FirstName") || col.Header.Equals("First Name")) { DataGridTemplateColumn templateColumn = new DataGridTemplateColumn(); templateColumn.Header = col.Header; templateColumn.CellEditingTemplate = dictionary["myCellEditingTemplateFirstName"] as DataTemplate; _grid.Columns.Insert(index, templateColumn); item = col; break; } index++; } _grid.Columns.Remove(item); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.dataGrid = ((System.Windows.Controls.DataGrid)(target)); #line 18 "..\..\MainPage.xaml" this.dataGrid.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.dataGrid_SelectionChanged); #line default #line hidden return; case 2: this.pictureColumn = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 3: this.button = ((System.Windows.Controls.Button)(target)); #line 34 "..\..\MainPage.xaml" this.button.Click += new System.Windows.RoutedEventHandler(this.button_Click); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 265 "..\..\..\View\ReportAnalysisControl.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click); #line default #line hidden return; case 2: this.column29 = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 3: this.column30 = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 4: this.column31 = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; } this._contentLoaded = true; }
public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/ERP;component/Views/Qualidade/QualidadeFuncionario.xaml", System.UriKind.Relative)); this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot"))); this.satisfacaoFuncionarioSetDomainDataSource = ((System.Windows.Controls.DomainDataSource)(this.FindName("satisfacaoFuncionarioSetDomainDataSource"))); this.satisfacaoFuncionarioSetDataGrid = ((System.Windows.Controls.DataGrid)(this.FindName("satisfacaoFuncionarioSetDataGrid"))); this.codigo_funcionarioColumn = ((System.Windows.Controls.DataGridTextColumn)(this.FindName("codigo_funcionarioColumn"))); this.comentariosColumn = ((System.Windows.Controls.DataGridTextColumn)(this.FindName("comentariosColumn"))); this.data_avaliacaoColumn = ((System.Windows.Controls.DataGridTemplateColumn)(this.FindName("data_avaliacaoColumn"))); this.idColumn = ((System.Windows.Controls.DataGridTextColumn)(this.FindName("idColumn"))); this.nome_funcionarioColumn = ((System.Windows.Controls.DataGridTextColumn)(this.FindName("nome_funcionarioColumn"))); this.nota_ambiente_trabalhoColumn = ((System.Windows.Controls.DataGridTextColumn)(this.FindName("nota_ambiente_trabalhoColumn"))); this.nota_colegas_trabalhoColumn = ((System.Windows.Controls.DataGridTextColumn)(this.FindName("nota_colegas_trabalhoColumn"))); this.nota_finalColumn = ((System.Windows.Controls.DataGridTextColumn)(this.FindName("nota_finalColumn"))); this.nota_satisfacao_pessoalColumn = ((System.Windows.Controls.DataGridTextColumn)(this.FindName("nota_satisfacao_pessoalColumn"))); this.pgrSatisfacaoFuncionario = ((System.Windows.Controls.DataPager)(this.FindName("pgrSatisfacaoFuncionario"))); this.button1 = ((System.Windows.Controls.Button)(this.FindName("button1"))); this.dfrSatisfacaoFuncionario = ((System.Windows.Controls.DataForm)(this.FindName("dfrSatisfacaoFuncionario"))); this.button2 = ((System.Windows.Controls.Button)(this.FindName("button2"))); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.groupBox_Copy = ((System.Windows.Controls.GroupBox)(target)); return; case 2: this.pedidoDataGrid = ((System.Windows.Controls.DataGrid)(target)); #line 18 "..\..\..\CajeroPaginas\MantenedorOrdenes.xaml" this.pedidoDataGrid.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.pedidoDataGrid_SelectionChanged); #line default #line hidden return; case 3: this.id_pedidoColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 4: this.descripcionColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 5: this.valorColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 6: this.fechaColumn = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 7: this.estadoColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 8: this.groupBox_Copy1 = ((System.Windows.Controls.GroupBox)(target)); return; case 9: this.productoDataGrid = ((System.Windows.Controls.DataGrid)(target)); return; case 10: this.nombreColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 11: this.cantidadColumn1 = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 12: this.valorColumn1 = ((System.Windows.Controls.DataGridTextColumn)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.txtFileName = ((System.Windows.Controls.TextBox)(target)); return; case 2: this.btnBrowse = ((System.Windows.Controls.Button)(target)); #line 23 "..\..\..\ScriptGenerator.xaml" this.btnBrowse.Click += new System.Windows.RoutedEventHandler(this.btnBrowse_Click); #line default #line hidden return; case 3: this.btnSubmit = ((System.Windows.Controls.Button)(target)); #line 26 "..\..\..\ScriptGenerator.xaml" this.btnSubmit.Click += new System.Windows.RoutedEventHandler(this.btnSubmit_Click); #line default #line hidden return; case 4: this.dgScriptData = ((System.Windows.Controls.DataGrid)(target)); return; case 5: this.colSrNo = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 6: this.colColumnName = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 7: this.colDataType = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 8: this.colSize = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 9: this.btnAddRow = ((System.Windows.Controls.Button)(target)); #line 134 "..\..\..\ScriptGenerator.xaml" this.btnAddRow.Click += new System.Windows.RoutedEventHandler(this.btnAddRow_Click); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.tEmptyMessage = ((System.Windows.Controls.TextBlock)(target)); return; case 2: this.dgTodoList = ((System.Windows.Controls.DataGrid)(target)); return; case 3: this.ExecuteColumnHeader = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 4: this.TitleColumnHeader = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 5: this.ActionsColumnHeader = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.btn_adddRequest = ((System.Windows.Controls.Button)(target)); #line 25 "..\..\..\UControls\UCTodoList.xaml" this.btn_adddRequest.Click += new System.Windows.RoutedEventHandler(this.btn_adddRequest_Click); #line default #line hidden return; case 2: this.ucTodolist_addRequest = ((System.Windows.Controls.Label)(target)); return; case 3: this.grid_detail = ((System.Windows.Controls.Button)(target)); #line 34 "..\..\..\UControls\UCTodoList.xaml" this.grid_detail.Click += new System.Windows.RoutedEventHandler(this.Grid_detail_Click); #line default #line hidden return; case 4: this.ucTodolist_ListDetail = ((System.Windows.Controls.Label)(target)); return; case 5: this.Grid_todoList = ((System.Windows.Controls.DataGrid)(target)); #line 47 "..\..\..\UControls\UCTodoList.xaml" this.Grid_todoList.Loaded += new System.Windows.RoutedEventHandler(this.Grid_todoList_Loaded); #line default #line hidden return; case 6: this.ucTodolist_Processes = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 10: this.ucTodolist_requestNumber = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 12: this.ucTodolist_Priority = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 13: this.ucTodolist_Description = ((System.Windows.Controls.DataGridTextColumn)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.ProfitLossStatementGridLines = ((System.Windows.Controls.DataGrid)(target)); return; case 2: this.dg1 = ((System.Windows.Controls.DataGrid)(target)); return; case 3: this.TxtAccountType = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 4: this.TxtAccountName = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 5: this.TxtCurrentBalance = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; } this._contentLoaded = true; }
public TextureManager() { InitializeComponent(); DataGridTemplateColumn col = new DataGridTemplateColumn(); Binding imgBinding = new Binding("Name") { Converter = new Controls.PathToImageConverter() }; FrameworkElementFactory imgFactory = new FrameworkElementFactory(typeof(Image)); imgFactory.SetBinding(Image.SourceProperty, imgBinding); imgFactory.SetValue(Image.MaxHeightProperty, 64.0); imgFactory.SetValue(Image.MaxWidthProperty, 64.0); imgFactory.SetValue(Image.TagProperty, "PreviewImage"); ((DataGridTemplateColumn)col).CellTemplate = new DataTemplate(); ((DataGridTemplateColumn)col).CellTemplate.VisualTree = imgFactory; col.Header = "Preview"; gridView.Columns.Add(col); formStack.Children.Add(textureForm_ = new ReflectiveForm(typeof(Urho.Texture))); texTree.DataContext = Project.inst().Textures; texTree.SelectedItemChanged += texTree_SelectedItemChanged; gridView.DataContext = flat_ = Project.inst().Textures.GetFlat(); formStack.Children.Add(nothing_ = new NothingHere("Texture")); nothing_.Visibility = System.Windows.Visibility.Visible; textureForm_.Visibility = System.Windows.Visibility.Collapsed; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.ProcessView = ((System.Windows.Controls.DataGrid)(target)); return; case 2: #line 21 "..\..\..\ProcessForm.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.KillProcess_Click); #line default #line hidden return; case 3: this.cbc = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 5: this.ReceivedByte = ((System.Windows.Controls.TextBlock)(target)); return; case 6: this.SentByte = ((System.Windows.Controls.TextBlock)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.txtSerie = ((System.Windows.Controls.TextBox)(target)); return; case 2: this.txtNumero = ((System.Windows.Controls.TextBox)(target)); return; case 3: this.txtProveedorRazonSocial = ((System.Windows.Controls.TextBox)(target)); return; case 4: this.GridDocReferencias = ((System.Windows.Controls.Grid)(target)); return; case 5: this.ListDocReferencia = ((System.Windows.Controls.DataGrid)(target)); return; case 6: this.dtgDetalleColumnEliminar = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 7: this.ListDetail = ((System.Windows.Controls.DataGrid)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.dgrID = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 2: this.dgrTen = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 3: this.dgrNgayCap = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 4: this.dgrEdit = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 5: this.dgrDelete = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 9 "..\..\..\Views\MovieList.xaml" ((MovieBookingSytem.Views.Window1)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden return; case 2: this.movieDataGrid = ((System.Windows.Controls.DataGrid)(target)); return; case 3: this.castsColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 4: this.directorColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 5: this.genreColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 6: this.idColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 7: this.imdbRatingColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 8: this.pgRatingColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 9: this.releaseDateColumn = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 10: this.rottenTomatoesRatingColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 11: this.titleColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 12: this.trailerColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.btnTaxMain = ((System.Windows.Controls.Button)(target)); #line 7 "..\..\ADD_Tax.xaml" this.btnTaxMain.Click += new System.Windows.RoutedEventHandler(this.btnTaxMain_Click); #line default #line hidden return; case 2: this.txtTax_TName = ((System.Windows.Controls.TextBox)(target)); return; case 3: this.txtTax_TPercent = ((System.Windows.Controls.TextBox)(target)); return; case 4: this.btnTax_AddTax = ((System.Windows.Controls.Button)(target)); #line 16 "..\..\ADD_Tax.xaml" this.btnTax_AddTax.Click += new System.Windows.RoutedEventHandler(this.btnTax_AddTax_Click); #line default #line hidden return; case 5: this.dgrd_Tax = ((System.Windows.Controls.DataGrid)(target)); return; case 6: this.grsrno = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 7: this.grdTaxType = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 8: this.grdPercentage = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 9: this.Action2 = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 11: this.Action = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.cmbYearSearch = ((System.Windows.Controls.ComboBox)(target)); return; case 2: this.cmbQuarterSearch = ((System.Windows.Controls.ComboBox)(target)); return; case 3: this.cmbMonthSearch = ((System.Windows.Controls.ComboBox)(target)); return; case 4: this.CustomGridLines1 = ((System.Windows.Controls.DataGrid)(target)); return; case 5: this.dg2 = ((System.Windows.Controls.DataGrid)(target)); return; case 6: this.CustomGridLines = ((System.Windows.Controls.DataGrid)(target)); return; case 7: this.dg1 = ((System.Windows.Controls.DataGrid)(target)); return; case 8: this.Name = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 9: this.Date = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 10: this.TransactionNo = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 11: this.Price = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 12: this.QtyIn = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 13: this.Balance = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.PrintWindow = ((WpfApplication1.PrintPage)(target)); #line 6 "..\..\PrintPage.xaml" this.PrintWindow.Loaded += new System.Windows.RoutedEventHandler(this.PrintWindow_Loaded); #line default #line hidden return; case 2: this.btnPrint = ((System.Windows.Controls.Button)(target)); #line 14 "..\..\PrintPage.xaml" this.btnPrint.Click += new System.Windows.RoutedEventHandler(this.btnPrint_Click); #line default #line hidden return; case 3: this.PrintPanel = ((System.Windows.Controls.StackPanel)(target)); return; case 4: this.grid1 = ((System.Windows.Controls.StackPanel)(target)); return; case 5: this.nameLabel = ((System.Windows.Controls.Label)(target)); return; case 6: this.mainRecipeDetailsDataGrid = ((System.Windows.Controls.DataGrid)(target)); return; case 7: this.ingredientsColumn = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 8: this.quantityColumn = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 9: this.unitsColumn = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 10: this.descriptionTextBlock = ((System.Windows.Controls.TextBlock)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.PatientsList = ((System.Windows.Controls.DataGrid)(target)); return; case 2: this.Birth = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 3: this.GridSearchPanel = ((System.Windows.Controls.Grid)(target)); return; case 4: this.CloseSerachPanel = ((System.Windows.Controls.Button)(target)); #line 74 "..\..\..\..\Views\AdminPages\Patients.xaml" this.CloseSerachPanel.Click += new System.Windows.RoutedEventHandler(this.CloseSerachPanel_Click); #line default #line hidden return; case 5: this.OpenSerachPanel = ((System.Windows.Controls.Button)(target)); #line 77 "..\..\..\..\Views\AdminPages\Patients.xaml" this.OpenSerachPanel.Click += new System.Windows.RoutedEventHandler(this.OpenSerachPanel_Click); #line default #line hidden return; case 6: this.NameFirst = ((System.Windows.Controls.TextBox)(target)); return; case 7: this.NameLast = ((System.Windows.Controls.TextBox)(target)); return; case 8: this.Numb = ((System.Windows.Controls.TextBox)(target)); return; case 9: this.DateOfBirthd = ((System.Windows.Controls.TextBox)(target)); return; case 10: this.search = ((System.Windows.Controls.Button)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.TopElement = ((System.Windows.Controls.Grid)(target)); return; case 2: this.DataGrid = ((System.Windows.Controls.DataGrid)(target)); #line 17 "..\..\InstallKmsKeys.xaml" this.DataGrid.LoadingRow += new System.EventHandler <System.Windows.Controls.DataGridRowEventArgs>(this.DataGrid_LoadingRow); #line default #line hidden return; case 3: this.PartialProductKeyColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 4: this.LicenseStatusColumn = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 5: this.SelectColumn = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 8: this.ResultColumn = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 9: this.InstallButton = ((System.Windows.Controls.Button)(target)); #line 96 "..\..\InstallKmsKeys.xaml" this.InstallButton.Click += new System.Windows.RoutedEventHandler(this.InstallButton_Click); #line default #line hidden return; case 10: this.CancelButton = ((System.Windows.Controls.Button)(target)); return; case 11: this.LabelStatus = ((System.Windows.Controls.TextBlock)(target)); return; case 12: this.ProgressBar = ((System.Windows.Controls.ProgressBar)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 11 "..\..\WorkWindow.xaml" ((Abdulkhakim.WorkWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden return; case 2: this.buttonClose = ((System.Windows.Controls.Button)(target)); #line 27 "..\..\WorkWindow.xaml" this.buttonClose.Click += new System.Windows.RoutedEventHandler(this.buttonClose_Click); #line default #line hidden return; case 3: this.receiptsDataGrid = ((System.Windows.Controls.DataGrid)(target)); return; case 4: this.iDColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 5: this.sNPColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 6: this.addressColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 7: this.serviceColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 8: this.dataColumn = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 9: this.priceColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 10: this.statusColumn = ((System.Windows.Controls.DataGridCheckBoxColumn)(target)); return; } this._contentLoaded = true; }
public void Create(ReportAnswer answer) { Answer = answer; dataReport.AutoGenerateColumns = false; dataReport.CanUserResizeColumns = false; dataReport.CanUserSortColumns = false; dataReport.CanUserReorderColumns = false; dataReport.Columns.Clear(); DataGridTemplateColumn columnHeader=new DataGridTemplateColumn(); columnHeader.Header = "Параметр"; DataTemplate temlate=headerTemplate; columnHeader.CellTemplate = temlate; columnHeader.ClipboardContentBinding = new System.Windows.Data.Binding(); columnHeader.ClipboardContentBinding.Mode = System.Windows.Data.BindingMode.OneTime; columnHeader.ClipboardContentBinding.Path = new PropertyPath("Header"); dataReport.Columns.Add(columnHeader); foreach (KeyValuePair<string,string> de in answer.Columns) { DataGridTemplateColumn column=new DataGridTemplateColumn(); column.Header = de.Value; column.CellTemplate = XamlReader.Load(columnTemplateStr.Replace("~param~",de.Key).Replace("~format~",answer.Formats[de.Key])) as DataTemplate; column.Width = new DataGridLength(1, DataGridLengthUnitType.SizeToCells); column.ClipboardContentBinding = new System.Windows.Data.Binding(); column.ClipboardContentBinding.Path = new PropertyPath("DataStr"); column.ClipboardContentBinding.Converter = converter; column.ClipboardContentBinding.ConverterParameter = de.Key; column.MinWidth = 50; dataReport.Columns.Add(column); } /*DataGridTextColumn columnHeader=new DataGridTextColumn(); columnHeader.Header = "Параметр"; columnHeader.IsReadOnly = true; columnHeader.Binding = new System.Windows.Data.Binding(); columnHeader.Binding.Mode = System.Windows.Data.BindingMode.OneTime; columnHeader.Binding.Path = new PropertyPath("Header"); dataReport.Columns.Add(columnHeader); foreach (KeyValuePair<string,string> de in answer.Columns){ DataGridTextColumn column=new DataGridTextColumn(); column.Header = de.Value; column.Binding = new System.Windows.Data.Binding(); column.Binding.Path = new PropertyPath("DataStr"); column.Binding.Converter = converter; column.Binding.ConverterParameter = de.Key; column.Width = new DataGridLength(1, DataGridLengthUnitType.SizeToCells); column.MinWidth = 50; dataReport.Columns.Add(column); }*/ dataReport.ItemsSource = answer.Data; chartControl.Create(answer.Chart); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 33 "..\..\MainWindow.xaml" ((System.Windows.Controls.Grid)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Grid_Loaded); #line default #line hidden return; case 2: this.btnExit = ((System.Windows.Controls.Button)(target)); #line 50 "..\..\MainWindow.xaml" this.btnExit.Click += new System.Windows.RoutedEventHandler(this.btnExit_Click); #line default #line hidden return; case 3: #line 54 "..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click); #line default #line hidden return; case 4: this.dg = ((System.Windows.Controls.DataGrid)(target)); #line 55 "..\..\MainWindow.xaml" this.dg.Loaded += new System.Windows.RoutedEventHandler(this.DataGrid_Loaded); #line default #line hidden return; case 6: this.action = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 8: this.combo_class = ((System.Windows.Controls.ComboBox)(target)); return; case 9: this.desc = ((System.Windows.Controls.TextBox)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.EndDate = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 4 "..\..\..\..\Views\OutsoleInputMaterialWindow.xaml" ((MasterSchedule.Views.OutsoleInputMaterialWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden return; case 2: this.dgOutsoleMaterial = ((System.Windows.Controls.DataGrid)(target)); #line 27 "..\..\..\..\Views\OutsoleInputMaterialWindow.xaml" this.dgOutsoleMaterial.CellEditEnding += new System.EventHandler <System.Windows.Controls.DataGridCellEditEndingEventArgs>(this.dgOutsoleMaterial_CellEditEnding); #line default #line hidden return; case 3: this.colSuppliers = ((System.Windows.Controls.DataGridComboBoxColumn)(target)); return; case 4: this.colETD = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 5: this.colActualDate = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 6: this.colCompleted = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 8: this.colAddRack = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 10: this.btnSave = ((System.Windows.Controls.Button)(target)); #line 55 "..\..\..\..\Views\OutsoleInputMaterialWindow.xaml" this.btnSave.Click += new System.Windows.RoutedEventHandler(this.btnSave_Click); #line default #line hidden return; } this._contentLoaded = true; }
public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/Segator.Loms.Modules.Dispatcher.Silverlight;component/Silverlight/Quotations/Boo" + "kingControls/BookingControl.xaml", System.UriKind.Relative)); this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot"))); this.bookingDataGrid = ((System.Windows.Controls.DataGrid)(this.FindName("bookingDataGrid"))); this.ActionColumn = ((System.Windows.Controls.DataGridTemplateColumn)(this.FindName("ActionColumn"))); }
public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/SMT.FileUpLoad;component/FileControl.xaml", System.UriKind.Relative)); this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot"))); this.List = ((System.Windows.Controls.DataGrid)(this.FindName("List"))); this.filedown = ((System.Windows.Controls.DataGridTemplateColumn)(this.FindName("filedown"))); this.btnUp = ((System.Windows.Controls.Button)(this.FindName("btnUp"))); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.window = ((CargoManagementSystem.View.WarehouseManagementUserControl)(target)); return; case 2: this.DataGrid = ((System.Windows.Controls.DataGrid)(target)); return; case 3: this.CargoName = ((MaterialDesignThemes.Wpf.DataGridTextColumn)(target)); return; case 4: this.Category = ((MaterialDesignThemes.Wpf.DataGridTextColumn)(target)); return; case 5: this.Material = ((MaterialDesignThemes.Wpf.DataGridTextColumn)(target)); return; case 6: this.Size = ((MaterialDesignThemes.Wpf.DataGridTextColumn)(target)); return; case 7: this.WarehouseName = ((MaterialDesignThemes.Wpf.DataGridTextColumn)(target)); return; case 8: this.PlaneName = ((MaterialDesignThemes.Wpf.DataGridTextColumn)(target)); return; case 9: this.BlockName = ((MaterialDesignThemes.Wpf.DataGridTextColumn)(target)); return; case 10: this.UnitPurchasePrize = ((MaterialDesignThemes.Wpf.DataGridComboBoxColumn)(target)); return; case 11: this.Amount = ((MaterialDesignThemes.Wpf.DataGridTextColumn)(target)); return; case 12: this.Operation = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; } this._contentLoaded = true; }
//Here is where we add the custom styles for the columns private void DataGrid_AutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e) { if (e.PropertyName == "Name") { DataGridTemplateColumn templateColumn = new DataGridTemplateColumn(); templateColumn.Header = String.Empty; templateColumn.CellTemplate = (DataTemplate)Application.Current.Resources["headerCellTemplate"]; e.Column = templateColumn; } }
public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/bing;component/Regiuni/History.xaml", System.UriKind.Relative)); this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot"))); this.dataGrid1 = ((System.Windows.Controls.DataGrid)(this.FindName("dataGrid1"))); this.Coloana1 = ((System.Windows.Controls.DataGridTemplateColumn)(this.FindName("Coloana1"))); this.Coloana2 = ((System.Windows.Controls.DataGridTemplateColumn)(this.FindName("Coloana2"))); this.Coloana3 = ((System.Windows.Controls.DataGridTemplateColumn)(this.FindName("Coloana3"))); }
private void addCustomColumn(string columnName) { DataGridTemplateColumn dt = new DataGridTemplateColumn(); dt.Header = columnName; FrameworkElementFactory editButton = new FrameworkElementFactory(typeof(Button), string.Format("{0}Button", columnName.ToLower())); editButton.SetValue(Button.ContentProperty, columnName); editButton.SetValue(Button.NameProperty, string.Format("{0}Button", columnName.ToLower())); editButton.AddHandler(Button.ClickEvent, new RoutedEventHandler(delete_Click)); DataTemplate cellTemplate = new DataTemplate(); cellTemplate.VisualTree = editButton; dt.CellTemplate = cellTemplate; resultsGrid.Columns.Add(dt); }
private DataGridTemplateColumn createDateTimeColumn(string header, string propertyName) { DataGridTemplateColumn col = new DataGridTemplateColumn(); col.Header = header; FrameworkElementFactory datePickerFactoryElem = new FrameworkElementFactory(typeof(DateTimePicker)); Binding dateBind = new Binding(propertyName); dateBind.UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged; dateBind.UpdateSourceTrigger = UpdateSourceTrigger.LostFocus; dateBind.Mode = BindingMode.TwoWay; datePickerFactoryElem.SetValue(DateTimePicker.ValueProperty, dateBind); var cellTemplate = new DataTemplate(); cellTemplate.VisualTree = datePickerFactoryElem; col.CellTemplate = cellTemplate; col.Width = 150; return col; }
private static void AddColumns(DataGrid dataGrid, IEnumerable columns) { foreach (var column in columns) { //CustomBoundColumn customBoundColumn = new CustomBoundColumn() DataGridTemplateColumn customBoundColumn = new DataGridTemplateColumn() { Header = column, HeaderTemplate = GetHeaderTemplate(dataGrid), CellTemplate = GetAttachedCellTemplate(dataGrid), CellEditingTemplate = GetAttachedCellEditingTemplate(dataGrid), //MappedValueCollection = GetMappedValues(dataGrid) }; dataGrid.Columns.Add(customBoundColumn); } }
public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/ERP;component/Views/QualidadeCliente.xaml", System.UriKind.Relative)); this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot"))); this.satisfacaoClienteSetDomainDataSource = ((System.Windows.Controls.DomainDataSource)(this.FindName("satisfacaoClienteSetDomainDataSource"))); this.satisfacaoClienteSetDataGrid = ((System.Windows.Controls.DataGrid)(this.FindName("satisfacaoClienteSetDataGrid"))); this.comentariosColumn = ((System.Windows.Controls.DataGridTextColumn)(this.FindName("comentariosColumn"))); this.data_avaliacaoColumn = ((System.Windows.Controls.DataGridTemplateColumn)(this.FindName("data_avaliacaoColumn"))); this.idColumn = ((System.Windows.Controls.DataGridTextColumn)(this.FindName("idColumn"))); this.nomeColumn = ((System.Windows.Controls.DataGridTextColumn)(this.FindName("nomeColumn"))); this.nota_finalColumn = ((System.Windows.Controls.DataGridTextColumn)(this.FindName("nota_finalColumn"))); this.outra_opiniaoColumn = ((System.Windows.Controls.DataGridCheckBoxColumn)(this.FindName("outra_opiniaoColumn"))); this.qualidade_atendimentoColumn = ((System.Windows.Controls.DataGridTextColumn)(this.FindName("qualidade_atendimentoColumn"))); this.tempo_esperaColumn = ((System.Windows.Controls.DataGridTextColumn)(this.FindName("tempo_esperaColumn"))); }
public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/bing;component/History.xaml", System.UriKind.Relative)); this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot"))); this.tabControl1 = ((System.Windows.Controls.TabControl)(this.FindName("tabControl1"))); this.Individual = ((System.Windows.Controls.TabItem)(this.FindName("Individual"))); this.dataGrid1 = ((System.Windows.Controls.DataGrid)(this.FindName("dataGrid1"))); this.Coloana1 = ((System.Windows.Controls.DataGridTemplateColumn)(this.FindName("Coloana1"))); this.MyPie = ((System.Windows.Controls.DataVisualization.Charting.Chart)(this.FindName("MyPie"))); this.textBlock1 = ((System.Windows.Controls.TextBlock)(this.FindName("textBlock1"))); this.textBlock2 = ((System.Windows.Controls.TextBlock)(this.FindName("textBlock2"))); this.All = ((System.Windows.Controls.TabItem)(this.FindName("All"))); this.AllChart = ((System.Windows.Controls.DataVisualization.Charting.Chart)(this.FindName("AllChart"))); this.LinearAxis = ((System.Windows.Controls.DataVisualization.Charting.LinearAxis)(this.FindName("LinearAxis"))); }
void AddDatePicker(DataTable table) { for (int i = 0; i < table.Columns.Count; ++i) { if (table.Columns[i].DataType.IsEquivalentTo(typeof(DateTime))) { DataGridTemplateColumn dgct = new DataGridTemplateColumn(); System.Windows.FrameworkElementFactory factory = new System.Windows.FrameworkElementFactory(typeof(DatePicker)); System.Windows.Data.Binding b = new System.Windows.Data.Binding(table.Columns[i].ColumnName); b.UpdateSourceTrigger = System.Windows.Data.UpdateSourceTrigger.PropertyChanged; factory.SetValue(DatePicker.SelectedDateProperty, b); System.Windows.DataTemplate cellEditingTemplate = new System.Windows.DataTemplate(); cellEditingTemplate.VisualTree = factory; dgct.CellTemplate = cellEditingTemplate; dgct.Header = table.Columns[i].ColumnName; DGrid.Columns[i] = dgct; } } }
public static DataGridColumn CreateDataGridTemplateColumn(ColumnHeader columnHeader, IStatementValidator statementValidator = null, IConnectionAdapter connectionAdapter = null) { var textBoxFactory = new FrameworkElementFactory(typeof(TextBox)); textBoxFactory.SetValue(TextBoxBase.IsReadOnlyProperty, true); textBoxFactory.SetValue(TextBoxBase.IsReadOnlyCaretVisibleProperty, true); var valueBinding = new Binding($"[{columnHeader.ColumnIndex}]") { Converter = CellValueConverter.Instance }; textBoxFactory.SetBinding(TextBox.TextProperty, valueBinding); var editingDataTemplate = new DataTemplate(typeof(DependencyObject)) { VisualTree = textBoxFactory }; var columnTemplate = new DataGridTemplateColumn { CellTemplateSelector = new ResultSetDataGridTemplateSelector(statementValidator, connectionAdapter, columnHeader), CellEditingTemplate = editingDataTemplate, ClipboardContentBinding = valueBinding }; ApplyColumnStyle(columnTemplate, columnHeader); return columnTemplate; }
private void AddColumn(FrameworkElementFactory ef,int widthPercent,string headerText,string sortOn = "",Style style=null) { // If overriding the default style // TODO: test this if (!(style == null)) ef.SetValue(StyleProperty, style); DataGridTemplateColumn newCol = new DataGridTemplateColumn(); if (sortOn.Length > 0) { newCol.CanUserSort = true; newCol.SortMemberPath = sortOn; } newCol.Header = headerText; newCol.Width = new DataGridLength(widthPercent, DataGridLengthUnitType.Star); DataTemplate template = new DataTemplate(); template.VisualTree = ef; newCol.CellTemplate = template; this.Columns.Add(newCol); }
void viewModel_OnUpdate(object sender, EventArgs e) { var d = DataContext as BatchDocumentCreatorViewModel; MainDataGrid.Columns.Where(x => x.MinWidth == 59).ToList().ForEach(x => MainDataGrid.Columns.Remove(x)); if (d != null) { var i = 2; foreach (var accountType in d.GetNeededAccountTypes()) { var accountNameBinding = new Binding(string.Format("[{0}].AccountName", accountType.Id)) { UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged }; var itemsSourceBinding = new Binding(string.Format("[{0}].AccountNames", accountType.Id)); var dgtc = new DataGridTemplateColumn { MinWidth = 59, Header = accountType.Name, }; var ct = new FrameworkElementFactory(typeof(TextBlock)); ct.SetValue(MarginProperty, new Thickness(3)); ct.SetBinding(TextBlock.TextProperty, accountNameBinding); dgtc.CellTemplate = new DataTemplate { VisualTree = ct }; var cte = new FrameworkElementFactory(typeof(ComboBox)); cte.SetValue(ComboBox.IsEditableProperty, true); cte.SetBinding(ItemsControl.ItemsSourceProperty, itemsSourceBinding); cte.SetBinding(ComboBox.TextProperty, accountNameBinding); dgtc.CellEditingTemplate = new DataTemplate { VisualTree = cte }; MainDataGrid.Columns.Insert(i, dgtc); i++; } } ICollectionView dataView = CollectionViewSource.GetDefaultView(MainDataGrid.ItemsSource); dataView.SortDescriptions.Clear(); dataView.SortDescriptions.Add(new SortDescription("Account.Name", ListSortDirection.Ascending)); dataView.Refresh(); }
public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/ERP;component/Views/QualidadeCliente/QualidadeFuncionario.xaml", System.UriKind.Relative)); this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot"))); this.satisfacaoFuncionarioSetDomainDataSource = ((System.Windows.Controls.DomainDataSource)(this.FindName("satisfacaoFuncionarioSetDomainDataSource"))); this.satisfacaoFuncionarioSetDataGrid = ((System.Windows.Controls.DataGrid)(this.FindName("satisfacaoFuncionarioSetDataGrid"))); this.codigo_funcionarioColumn = ((System.Windows.Controls.DataGridTextColumn)(this.FindName("codigo_funcionarioColumn"))); this.comentariosColumn = ((System.Windows.Controls.DataGridTextColumn)(this.FindName("comentariosColumn"))); this.data_avaliacaoColumn = ((System.Windows.Controls.DataGridTemplateColumn)(this.FindName("data_avaliacaoColumn"))); this.idColumn = ((System.Windows.Controls.DataGridTextColumn)(this.FindName("idColumn"))); this.nome_funcionarioColumn = ((System.Windows.Controls.DataGridTextColumn)(this.FindName("nome_funcionarioColumn"))); this.nota_ambiente_trabalhoColumn = ((System.Windows.Controls.DataGridTextColumn)(this.FindName("nota_ambiente_trabalhoColumn"))); this.nota_colegas_trabalhoColumn = ((System.Windows.Controls.DataGridTextColumn)(this.FindName("nota_colegas_trabalhoColumn"))); this.nota_finalColumn = ((System.Windows.Controls.DataGridTextColumn)(this.FindName("nota_finalColumn"))); this.nota_satisfacao_pessoalColumn = ((System.Windows.Controls.DataGridTextColumn)(this.FindName("nota_satisfacao_pessoalColumn"))); this.pgrSatisfacaoFuncionario = ((System.Windows.Controls.DataPager)(this.FindName("pgrSatisfacaoFuncionario"))); this.button1 = ((System.Windows.Controls.Button)(this.FindName("button1"))); this.dfrSatisfacaoFuncionario = ((System.Windows.Controls.DataForm)(this.FindName("dfrSatisfacaoFuncionario"))); }
private void ItemSourceChanged(object sender, EventArgs e) { var viewModel = (TimeTrackingViewModel)DataContext; var date = viewModel.FirstDay; for (int i = grid.Columns.Count - 1; i >= 3; i--) grid.Columns.RemoveAt(i); for (int i = 0; i < viewModel.TotalDays; i++) { var factory = new FrameworkElementFactory(typeof(TimeTrackingCellView)); factory.SetValue(TimeTrackingCellView.DataContextProperty, new Binding(string.Format("DayTracks[{0}]", i))); var column = new DataGridTemplateColumn() { Width = 60, CanUserResize = false, CanUserSort = false, CellTemplate = new DataTemplate() { VisualTree = factory, }, }; var textBlock = new TextBlock(); textBlock.Text = date.ToString("dd MM"); textBlock.ToolTip = DayOfWeekToString(date.DayOfWeek); if (date.DayOfWeek == DayOfWeek.Saturday || date.DayOfWeek == DayOfWeek.Sunday) { textBlock.Foreground = Brushes.DarkGray; } textBlock.HorizontalAlignment = System.Windows.HorizontalAlignment.Center; textBlock.FontWeight = FontWeights.Bold; column.Header = textBlock; grid.Columns.Add(column); date = date.AddDays(1); } }
public override void Initialize() { base.Initialize(); //create your menus var mainMenu = this.MenuService.CreateMenu(Manager.KnownMenuArea.HostManagementModule, DF_ROOT_MENU_KEY, "Deep Freeze", false, "icon-deep-freeze", null, null, null); var freezeMenu = this.MenuService.CreateMenu(DF_ROOT_MENU_KEY, DF_MENU_FREEZE,"Freeze", false, "icon-deep-freeze", OnCanExecuteAction, OnExecuteAction, true); var unfreezeMenu = this.MenuService.CreateMenu(DF_ROOT_MENU_KEY, DF_MENU_UNFREEZE,"Unfreeze", false, "icon-deep-unfreeze", OnCanExecuteAction, OnExecuteAction, false); var column = new DataGridTemplateColumn() { Header = "Deep Freeze" }; this.HostView.Columns.Last().Width = DataGridLength.Auto; this.HostView.Columns.Add(column); var resources = new ResourceDictionary(); resources.Source = new Uri("pack://application:,,,/ManagerPlugins;component/Resources/DeepFreezePluginRes.xaml", UriKind.Absolute); column.CellTemplate = resources["_deep_freeze_display_template"] as DataTemplate; //add your resources to application //this will allow them to be resolved by other application parts Application.Current.Resources.MergedDictionaries.Add(resources); }
public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/Bcheck.TaskUI;component/TasksView.xaml", System.UriKind.Relative)); this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot"))); this.TaskGrid = ((System.Windows.Controls.DataGrid)(this.FindName("TaskGrid"))); this.TaskName = ((System.Windows.Controls.DataGridTemplateColumn)(this.FindName("TaskName"))); this.TaskDescription = ((System.Windows.Controls.DataGridTemplateColumn)(this.FindName("TaskDescription"))); this.Assignedto = ((System.Windows.Controls.DataGridTemplateColumn)(this.FindName("Assignedto"))); this.DueTime = ((System.Windows.Controls.DataGridTextColumn)(this.FindName("DueTime"))); this.Status = ((System.Windows.Controls.DataGridTextColumn)(this.FindName("Status"))); this.ManagementSignOff = ((System.Windows.Controls.DataGridTextColumn)(this.FindName("ManagementSignOff"))); this.Kri = ((System.Windows.Controls.DataGridTemplateColumn)(this.FindName("Kri"))); this.Comments = ((System.Windows.Controls.DataGridTemplateColumn)(this.FindName("Comments"))); this.TaskFlag = ((System.Windows.Controls.DataGridTemplateColumn)(this.FindName("TaskFlag"))); this.Attachments = ((System.Windows.Controls.DataGridTemplateColumn)(this.FindName("Attachments"))); this.CompletedColumn = ((System.Windows.Controls.DataGridTemplateColumn)(this.FindName("CompletedColumn"))); this.ApprovedColumn = ((System.Windows.Controls.DataGridTemplateColumn)(this.FindName("ApprovedColumn"))); this.RejectedColumn = ((System.Windows.Controls.DataGridTemplateColumn)(this.FindName("RejectedColumn"))); this.TaskEdit = ((System.Windows.Controls.DataGridTemplateColumn)(this.FindName("TaskEdit"))); this.RevisionHistory = ((System.Windows.Controls.DataGridTemplateColumn)(this.FindName("RevisionHistory"))); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 5 "..\..\..\..\Windows\ProjectCost\EditProjectCost_ProjectWindow.xaml" ((ProjectMaster2016.EditProjectCost_ProjectWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden return; case 2: this.projectDataGrid = ((System.Windows.Controls.DataGrid)(target)); return; case 3: this.pidColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 4: this.projectnameColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 5: this.employee_eidColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 6: this.pdescriptionColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 7: this.pdateColumn = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 8: this.projectisfinishedColumn = ((System.Windows.Controls.DataGridCheckBoxColumn)(target)); return; case 9: this.pdeadlineColumn = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 10: this.btnSelectProject = ((System.Windows.Controls.Button)(target)); #line 35 "..\..\..\..\Windows\ProjectCost\EditProjectCost_ProjectWindow.xaml" this.btnSelectProject.Click += new System.Windows.RoutedEventHandler(this.btnSelectProject_Click); #line default #line hidden return; } this._contentLoaded = true; }
/// <summary> /// Creates the columns when AutoGenerateColumns=false (takes care of Images, etc...) /// </summary> /// <param name="dcol">DataColumn collection</param> private void CreateColumns(DataColumnCollection dcol) { this.Columns.Clear(); foreach (DataColumn dc in dcol) { DataGridColumn dgc = null; switch (dc.DataType.Name) { case "Boolean": DataGridCheckBoxColumn checkBoxColumn = new DataGridCheckBoxColumn(); checkBoxColumn.Binding = new Binding(dc.ColumnName); dgc = checkBoxColumn; break; case "Image": DataGridTemplateColumn templateColumn = new DataGridTemplateColumn(); // Build template in memory StringBuilder CellTemp = new StringBuilder(); CellTemp.Append("<DataTemplate "); CellTemp.Append("xmlns='http://schemas.microsoft.com/winfx/"); CellTemp.Append("2006/xaml/presentation' "); CellTemp.Append("xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml' "); CellTemp.Append("xmlns:local='clr-namespace:BindableDataGrid;assembly=BindableDataGrid'>"); CellTemp.Append("<Image Source='{Binding " + dc.ColumnName + ".Source }' ></Image>"); CellTemp.Append("</DataTemplate>"); templateColumn.CellTemplate = (DataTemplate)XamlReader.Load(CellTemp.ToString()); // Set editing template the same as regular one (will not be editable) templateColumn.CellEditingTemplate = (DataTemplate)XamlReader.Load(CellTemp.ToString()); dgc = templateColumn; break; //case "String": //case "Int32": //case "DateTime": default: // Treat everything else as a string DataGridTextColumn textColumn = new DataGridTextColumn(); textColumn.Binding = new Binding(dc.ColumnName); dgc = textColumn; break; } if (dgc != null) { dgc.Header = dc.Caption; dgc.IsReadOnly = dc.ReadOnly; dgc.CanUserResize = dc.AllowResize; dgc.CanUserSort = dc.AllowSort; dgc.CanUserReorder = dc.AllowReorder; this.Columns.Add(dgc); } } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 8 "..\..\Details.xaml" ((Rectify.Details)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden return; case 2: this.studentDataGrid = ((System.Windows.Controls.DataGrid)(target)); return; case 3: this.iDColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 4: this.mentorIDColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 5: this.lastNameColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 6: this.emailColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 7: this.dateOfBirthColumn = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 8: this.home_AddressColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 9: this.phoneColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 10: this.firstNameColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 11: this.attendanceDetailDataGrid = ((System.Windows.Controls.DataGrid)(target)); #line 33 "..\..\Details.xaml" this.attendanceDetailDataGrid.RowEditEnding += new System.EventHandler<System.Windows.Controls.DataGridRowEditEndingEventArgs>(this.attendanceDetailDataGrid_RowEditEnding); #line default #line hidden return; case 12: this.iDColumn1 = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 13: this.studentIDColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 14: this.hoursPerDayColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 15: this.attendanceDateColumn = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 16: this.button = ((System.Windows.Controls.Button)(target)); return; } this._contentLoaded = true; }
private void UpdateAll() { dgrid.Columns.Clear(); if (!Episodes.Any()) return; var episodesSorted = Episodes.OrderBy(e => e, EpisodeComparer); //sort Episodes by season, episode var uploadsSorted = episodesSorted.SelectMany(e => e.Downloads.Select(d => d.Upload)).OrderBy(u=>u,UploadComparer).Distinct(); //get a unique collection of the Uploads, sorted by fav/nofav List<Header> headers = new List<Header>(); _cells = new List<Cell>(); int i = 0; //Idea: In the following Loop we create 1 Header instance for ALL Uploads (regardless of the season) which have the same String-Representation foreach (var upload in uploadsSorted) { String title = BuildUploadTitle(upload); var existingHeader =headers.FirstOrDefault(h => h.Title == title); if (existingHeader == null) { Header newHeader = new Header(); newHeader.Title = BuildUploadTitle(upload); newHeader.ToggleCommand = new SimpleCommand<object,string>( s => ToggleColumn(newHeader,s)); newHeader.ToggleAllCommand = new SimpleCommand<object, object>(o => ToggleFullColumn(newHeader)); newHeader.Hosters = episodesSorted.SelectMany(e => e.Downloads) .Where(d => d.Upload == upload) .SelectMany(d => d.Links.Keys) .Distinct().ToList(); headers.Add(newHeader); DataGridTemplateColumn column = new DataGridTemplateColumn(); column.Header = newHeader; column.HeaderTemplate = new DataTemplate(); column.HeaderTemplate.VisualTree = new FrameworkElementFactory(typeof (MultiDownloadSelectionHeader)); column.HeaderStyle = (Style) FindResource("CenterGridHeaderStyle"); column.CellTemplate = new DataTemplate(); column.CellTemplate.VisualTree = new FrameworkElementFactory(typeof (MultiDownloadSelectionCell)); column.CellTemplate.VisualTree.SetBinding(DataContextProperty, new Binding("Cells[" + i + "]")); dgrid.Columns.Add(column); i++; } else //there's already an upload existing (maybe in another Season) with the same string represenation { existingHeader.Hosters = episodesSorted.SelectMany(e => e.Downloads) .Where(d => d.Upload == upload) .SelectMany(d => d.Links.Keys).Union(existingHeader.Hosters) .Distinct().ToList(); } } DataGridTemplateColumn fColumn = new DataGridTemplateColumn(); fColumn.HeaderStyle = (Style)FindResource("RemovedHeaderContentStyle"); fColumn.Width = new DataGridLength(1,DataGridLengthUnitType.Star); dgrid.Columns.Add(fColumn); List<Row> rows = new List<Row>(); foreach (var episode in episodesSorted) { Row r = new Row(); r.Title = "S" + episode.Season.Number + " E" + episode.Number; if (episode.EpisodeInformation != null && !String.IsNullOrWhiteSpace(episode.EpisodeInformation.Title)) { r.Tooltip = episode.EpisodeInformation.Title; } r.Cells = new List<Cell>(); bool firstSelected = true; foreach (var header in headers) { var c = new Cell(); c.Header = header; c.Entries = new List<CellEntry>(); c.Episode = episode; DownloadData dloads = episode.Downloads.FirstOrDefault(da => BuildUploadTitle(da.Upload) == header.Title); bool selected = dloads!=null && dloads.Upload.Favorized; if (firstSelected && selected) { firstSelected = false; } else if (!firstSelected) { selected = false; } foreach (var hoster in header.Hosters) { if (dloads!=null && dloads.Links.ContainsKey(hoster)) { c.Entries.Add(new CellEntry {Visibility = Visibility.Visible,Enabled=true, Link = dloads.Links[hoster], Checked = selected}); } else { c.Entries.Add(new CellEntry {Visibility = Visibility.Hidden,Enabled=false,Link = "",Checked = false}); } } _cells.Add(c); r.Cells.Add(c); } rows.Add(r); } dgrid.ItemsSource = rows; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 5 "..\..\..\..\Windows\SelectWindows\AddProjectCost_Employee.xaml" ((ProjectMaster2016.AddProjectCost_Employee)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden return; case 2: this.employeeDataGrid = ((System.Windows.Controls.DataGrid)(target)); return; case 3: this.eidColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 4: this.nameColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 5: this.emailColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 6: this.homeaddressColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 7: this.zipColumn = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 8: this.phoneColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 9: this.imgColumn = ((System.Windows.Controls.DataGridTemplateColumn)(target)); return; case 10: this.professionColumn = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 11: this.btnAddEmployee = ((System.Windows.Controls.Button)(target)); #line 38 "..\..\..\..\Windows\SelectWindows\AddProjectCost_Employee.xaml" this.btnAddEmployee.Click += new System.Windows.RoutedEventHandler(this.btnAddEmployee_Click); #line default #line hidden return; case 12: this.btnCancel = ((System.Windows.Controls.Button)(target)); return; } this._contentLoaded = true; }
/// <summary> /// Handles the AutoGeneratingColumn event of the Grid control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="DataGridAutoGeneratingColumnEventArgs"/> instance containing the event data.</param> private void Grid_AutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e) { if (e.Column.Header.ToString() == "מקט פריט" || e.Column.Header.ToString() == "שם פריט" || e.Column.Header.ToString() == "כמות כוללת בפועל" || e.Column.Header.ToString() == "מספר שלב הקבוצה" || e.Column.Header.ToString() == "שם שלב הקבוצה" || e.Column.Header.ToString() == "תאור שלב הקבוצה" || e.Column.Header.ToString() == "תיאור פריט") { // e.Cancel = true; // For not to include e.Column.IsReadOnly = true; // Makes the column as read only } if (e.Column.Header.ToString() == "סטטוס קבוצה") { string columnName = e.Column.Header.ToString(); Dictionary<string, string> comboKey = new Dictionary<string, string>() { {"רישום","רישום"}, {"בעבודה","בעבודה"}, {"תיקון","תיקון"}, {"פסול","פסול"}, {"גמר ייצור","גמר ייצור"}, {"הסתיים","הסתיים"}, }; DataGridTemplateColumn col1 = new DataGridTemplateColumn(); col1.Header = columnName; col1.SortMemberPath = columnName; #region Editing FrameworkElementFactory factory1 = new FrameworkElementFactory(typeof(ComboBox)); Binding b1 = new Binding(columnName); b1.IsAsync = true; b1.Mode = BindingMode.TwoWay; factory1.SetValue(ComboBox.ItemsSourceProperty, comboKey); factory1.SetValue(ComboBox.SelectedValuePathProperty, "Key"); factory1.SetValue(ComboBox.DisplayMemberPathProperty, "Value"); factory1.SetValue(ComboBox.SelectedValueProperty, b1); factory1.SetValue(ComboBox.SelectedItemProperty, col1); DataTemplate cellTemplate1 = new DataTemplate(); cellTemplate1.VisualTree = factory1; col1.CellTemplate = cellTemplate1; col1.CellEditingTemplate = cellTemplate1; col1.IsReadOnly = false; col1.InvalidateProperty(ComboBox.SelectedValueProperty); #endregion #region View FrameworkElementFactory sfactory = new FrameworkElementFactory(typeof(TextBlock)); sfactory.SetValue(TextBlock.TextProperty, b1); DataTemplate cellTemplate = new DataTemplate(); cellTemplate.VisualTree = sfactory; col1.CellTemplate = cellTemplate; #endregion e.Column = col1; } }
/// <summary> /// 创建权限列 /// </summary> /// <param name="dg"></param> private void DataGridColumnsAddGrid(DataGrid dg) { if (cache["tmpPermission"] == null) { tmpPermission = GetTmpPermission(); } else { tmpPermission = (List<T_SYS_PERMISSION>)cache["tmpPermission"]; } if (tmpPermission == null) { ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), "警告", "没法实例化权限列表请与开发人员或管理员联系!"); return; } DataGridTemplateColumn templateColumn; foreach (T_SYS_PERMISSION AA in tmpPermission) { templateColumn = new DataGridTemplateColumn(); templateColumn.Width = new DataGridLength(70); templateColumn.Header = AA.PERMISSIONNAME; if (!dg.Columns.Contains(templateColumn)) { dg.Columns.Add(templateColumn); } } }