private void ItemsControl_TargetUpdated_1(object sender, DataTransferEventArgs e) { var sw = DataContext as MenuItemSelectorViewModel; if (sw == null) return; NumeratorRow.Height = sw.IsNumeratorVisible ? _auto45 : _thin; //AlphaButtonsColumn.Width = sw.AlphaButtonValues != null && sw.AlphaButtonValues.Length > 0 ? _auto15 : _thin; }
private void chkClose_SourceUpdated(object sender, DataTransferEventArgs e) { if ((bool)this.chkClose.IsChecked && !(bool)this.chkManualClose.IsChecked) { this.Close(); } }
void TargetUpdated( object sender, DataTransferEventArgs e ) { // Trigger a property changed callback as long as the new value equals the default value. object current = DependencyObject.GetValue( DependencyProperty ); PropertyMetadata metaData = DependencyProperty.GetMetadata( DependencyObject ); bool equals = current == null ? current == metaData.DefaultValue : current.Equals( metaData.DefaultValue ); if ( equals ) { if ( metaData.PropertyChangedCallback != null ) { metaData.PropertyChangedCallback.Invoke( DependencyObject, new DependencyPropertyChangedEventArgs( DependencyProperty, current, current ) ); } } else { // Once it is no longer the default value, we know it has been changed. _frameworkElement.TargetUpdated -= TargetUpdated; NotifyOnTargetUpdated = _prevNotifyOnTargetUpdated; } }
private void OnComboBoxSourceUpdated(object sender, DataTransferEventArgs e) { var comboBox = sender as ComboBox; if (comboBox != null) { comboBox.IsDropDownOpen = true; } }
private void WayRef_SourceUpdated(object sender, DataTransferEventArgs e) { var model = this.DataContext as DishesWayRefViewModel; if (model != null) { model.SavePrice2WayRef(); } }
private async void SourcePathTextBox_SourceUpdated(object sender, DataTransferEventArgs e) { Debug.Assert(DataContext is ImportSettings); var settings = (ImportSettings)DataContext; SourcePathDoesNotExist.Visibility = (string.IsNullOrEmpty(settings.SourcePath) || Directory.Exists(settings.SourcePath)) ? System.Windows.Visibility.Collapsed : System.Windows.Visibility.Visible; await settings.UpdateSourcePathAsync().HandleAllExceptions(SR.ProductName); }
private void TextBox_OnTextChanged(object sender, DataTransferEventArgs e) { if (IssueList.SelectedIndex == -1) return; var bcf = this.DataContext as BcfFile; if (bcf == null) return; //if (e.Key != Key.Up && e.Key != Key.Down && e.Key != Key.Left && e.Key != Key.Right) bcf.HasBeenSaved = false; }
private void Binding_TargetUpdated(object sender, DataTransferEventArgs e) { string txt = TestTextBox.Text; mbindingExpression = BindingOperations.GetMultiBindingExpression(e.TargetObject, e.Property); mbindingExpression.UpdateSource(); foreach (var bind in mbindingExpression.BindingExpressions) bind.UpdateSource(); }
private void workingItemsDataGridTargetUpdated(object sender, DataTransferEventArgs e) { todosDataGrid.UpdateLayout(); var workingItemsDataGrid = UIHelper.FindChild<DataGrid>(todosDataGrid, "workingItemsDataGrid"); if (workingItemsDataGrid != null) { workingItemsDataGrid.Columns[2].Width = 0; workingItemsDataGrid.UpdateLayout(); workingItemsDataGrid.Columns[2].Width = new DataGridLength(1, DataGridLengthUnitType.Star); } }
private void Grid_Updated(object sender, System.Windows.Data.DataTransferEventArgs e) { if ((sender as ListView)?.View is GridView gridview) { foreach (var column in gridview.Columns) { // Set the Width. Then clear it to cause the autosize. column.Width = 1; column.ClearValue(GridViewColumn.WidthProperty); } } }
private void line_TargetUpdated(object sender, DataTransferEventArgs e) { tb1.GetBindingExpression(TextBlock.HorizontalAlignmentProperty).UpdateTarget(); tb1.GetBindingExpression(TextBlock.MarginProperty).UpdateTarget(); tb2.GetBindingExpression(TextBlock.HorizontalAlignmentProperty).UpdateTarget(); tb2.GetBindingExpression(TextBlock.MarginProperty).UpdateTarget(); line.GetBindingExpression(Line.VisibilityProperty).UpdateTarget(); line2.GetBindingExpression(Line.VisibilityProperty).UpdateTarget(); line3.GetBindingExpression(Line.VisibilityProperty).UpdateTarget(); selectionRectangle1.GetBindingExpression(Rectangle.MarginProperty).UpdateTarget(); selectionRectangle2.GetBindingExpression(Rectangle.MarginProperty).UpdateTarget(); }
private void OnTargetUpdated(object sender, DataTransferEventArgs args) { // Handle event var fe = sender as FrameworkElement; infoText.Text = ""; infoText.Text += args.Property.Name + " property of a " + args.Property.OwnerType.Name; infoText.Text += " element ("; infoText.Text += fe.Name; infoText.Text += ") updated..."; infoText.Text += DateTime.Now.ToLongDateString(); infoText.Text += " at "; infoText.Text += DateTime.Now.ToLongTimeString(); }
private void Selector_SourceUpdated(object sender, DataTransferEventArgs e) { ChooseShowTableViewModel model = this.DataContext as ChooseShowTableViewModel; if (model.Selector == 1) { ViewTabControl.SelectedIndex=0; } else { ViewTabControl.SelectedIndex = 1; } }
/// <remarks> /// To fire this event you must add in column binding: NotifyOnTargetUpdated=True /// </remarks> private static void OnControlTargetUpdated(object sender, DataTransferEventArgs e) { var listView = sender as ListView; var dataGrid = sender as DataGrid; if (listView != null && listView.View is GridView) { var gridView = listView.View as GridView; gridView.Columns.ForEach(x => { if (double.IsNaN(x.Width)) { x.Width = x.ActualWidth; } x.Width = double.NaN; }); } }
private void MainDataGrid_TargetUpdated(object sender, DataTransferEventArgs e) { Microsoft.Windows.Controls.DataGrid dataGrid = (Microsoft.Windows.Controls.DataGrid)sender; if (currentSortColumnIndex != null) { if (currentSortDirection == "Ascending") { dataGrid.Columns[Int32.Parse(currentSortColumnIndex)].SortDirection = ListSortDirection.Ascending; } else { dataGrid.Columns[Int32.Parse(currentSortColumnIndex)].SortDirection = ListSortDirection.Descending; } } }
private void Tb_SourceUpdated(object sender, DataTransferEventArgs e) { this.RaiseValueChanged(sender, (PTypeDataTag)(sender as FrameworkElement).Tag); }
private void Components_Updated(object sender, DataTransferEventArgs e) { ComponentViewModel s = sender as ComponentViewModel; if (s != null) { _components.Add(s); } }
private void TextBox_SourceUpdated(object sender, DataTransferEventArgs e) { // we need to delay this until after the text is changed var box = sender as TextBox; Validate( box ); }
private void imageList_SourceUpdated(object sender, DataTransferEventArgs e) { //MessageBox.Show("imageList_SourceUpdated event has fired"); }
private void currentImage_TargetUpdated(object sender, DataTransferEventArgs e) { //MessageBox.Show("currentImage_TargetUpdated event has fired"); }
private void WarningTextBlock_TargetUpdated(object sender, DataTransferEventArgs e) { adjustBorderVisibility(); }
private void DescriptionText_SourceUpdated(object sender, DataTransferEventArgs e) { if (DescriptionText.ActualHeight > 150) { DescriptionText.FontSize = 12; } }
private void eddiScriptsUpdated(object sender, DataTransferEventArgs e) { updateScriptsConfiguration(); }
private void PagesListBox_SourceUpdated(object sender, DataTransferEventArgs e) { }
private void WarningDB_TargetUpdated(object sender, System.Windows.Data.DataTransferEventArgs e) { BindingOperations.GetBindingExpressionBase(gridForside, Grid.HeightProperty).UpdateTarget(); }
private void txtStopTime_SourceUpdated(object sender, System.Windows.Data.DataTransferEventArgs e) { }
private void ErrorTextBlock_TargetUpdated(object sender, DataTransferEventArgs e) { adjustBorderVisibility(); adjustCreateButtonEnabled(); }
private void comboBox_Del_Vehicle_SourceUpdated(object sender, DataTransferEventArgs e) { this.comboBox_Del_Vehicle.ItemsSource = this.mycardealer.VehicleList; }
private void WorkspaceTabs_TargetUpdated(object sender, DataTransferEventArgs e) { if (WorkspaceTabs.SelectedIndex >= 0) ToggleWorkspaceTabVisibility(WorkspaceTabs.SelectedIndex); }
private void lbxTags_SourceUpdated(object sender, DataTransferEventArgs e) { SomeChangeForUpdate(); }
/// <summary> /// Handles changes in the current cell. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="DataTransferEventArgs" /> instance containing the event data.</param> /// <param name="changedCell">The cell that was changed.</param> private void CurrentCellSourceUpdated(object sender, DataTransferEventArgs e, CellRef changedCell) { // The source of the binding for the current cell was updated // (e.g. check box (display control) was changed or a combo box (edit control) was changed var value = this.GetCellValue(changedCell); var selectedCells = this.SelectedCells.ToArray(); if (!selectedCells.Contains(changedCell)) { // do not set other cells when changed cell is outside selection return; } // Set the same value in all selected cells. foreach (var cell in selectedCells) { if (changedCell.Equals(cell)) { // this value should already be set by the binding continue; } if (this.MultiChangeInChangedColumnOnly && cell.Column != changedCell.Column) { // do not change value in other columns when this property is set to true continue; } this.TrySetCellValue(cell, value); } }
private void TextBoxStockDetails_SourceUpdated(object sender, DataTransferEventArgs e) { if (listStock.SelectedIndex < 0) return; //MODIFIED _vo.UpdateStockItem(listStock.SelectedIndex); StockView.Modified = true; }
private void comboBox_del_customer_SourceUpdated(object sender, DataTransferEventArgs e) { this.comboBox_del_customer.ItemsSource = this.mycardealer.CustomerList; }
private void Image_SourceUpdated_1(object sender, System.Windows.Data.DataTransferEventArgs e) { var img = sender as Image; //Show(img); }