当前位置: 首页>>代码示例>>C#>>正文


C# Data.DataTransferEventArgs类代码示例

本文整理汇总了C#中System.Windows.Data.DataTransferEventArgs的典型用法代码示例。如果您正苦于以下问题:C# DataTransferEventArgs类的具体用法?C# DataTransferEventArgs怎么用?C# DataTransferEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DataTransferEventArgs类属于System.Windows.Data命名空间,在下文中一共展示了DataTransferEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: chkClose_SourceUpdated

 private void chkClose_SourceUpdated(object sender, DataTransferEventArgs e)
 {
     if ((bool)this.chkClose.IsChecked && !(bool)this.chkManualClose.IsChecked)
     {
         this.Close();
     }
 }
开发者ID:ZERUELX,项目名称:GestionDocumental20140711,代码行数:7,代码来源:DlgDownloadFile.xaml.cs

示例2: ItemsControl_TargetUpdated_1

 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;
 }
开发者ID:BOBAHbI4,项目名称:SambaPOS-3,代码行数:7,代码来源:MenuItemSelectorView.xaml.cs

示例3: TargetUpdated

 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;
     }
 }
开发者ID:snakshax,项目名称:Framework-Class-Library-Extension,代码行数:25,代码来源:AdvancedBindingExtension.cs

示例4: OnComboBoxSourceUpdated

 private void OnComboBoxSourceUpdated(object sender, DataTransferEventArgs e)
 {
     var comboBox = sender as ComboBox;
     if (comboBox != null)
     {
         comboBox.IsDropDownOpen = true;
     }
 }
开发者ID:heinersuter,项目名称:simple-ui-tests,代码行数:8,代码来源:UrlView.xaml.cs

示例5: SourcePathTextBox_SourceUpdated

 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);
 }
开发者ID:wenh123,项目名称:PTVS,代码行数:9,代码来源:FileSourcePage.xaml.cs

示例6: WayRef_SourceUpdated

        private void WayRef_SourceUpdated(object sender, DataTransferEventArgs e)
        {

            var model = this.DataContext as DishesWayRefViewModel;
            if (model != null)
            {
                model.SavePrice2WayRef();
            }
        }
开发者ID:huangxuanheng,项目名称:ChooseDishes,代码行数:9,代码来源:DischesWayRefView.xaml.cs

示例7: TextBox_OnTextChanged

 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;
 }
开发者ID:whztt07,项目名称:BCFier,代码行数:10,代码来源:BcfReportPanel.xaml.cs

示例8: Binding_TargetUpdated

 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();
 }
开发者ID:kokushkin,项目名称:TestRepository,代码行数:10,代码来源:MainWindow.xaml.cs

示例9: workingItemsDataGridTargetUpdated

 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);
     }
 }
开发者ID:Blackjack92,项目名称:TimeManagement,代码行数:11,代码来源:MainView.xaml.cs

示例10: line_TargetUpdated

 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();
 }
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:12,代码来源:Association.xaml.cs

示例11: Selector_SourceUpdated

        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;
            }


        }
开发者ID:huangxuanheng,项目名称:ChooseDishes,代码行数:13,代码来源:ChooseShowTableWindow.xaml.cs

示例12: OnTargetUpdated

 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();
 }
开发者ID:ClemensT,项目名称:WPF-Samples,代码行数:13,代码来源:MainWindow.cs

示例13: OnControlTargetUpdated

        /// <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;
                });
            }
        }
开发者ID:adalbertus,项目名称:BudgetPlanner,代码行数:21,代码来源:DataGridExtensions.cs

示例14: CurrentCellSourceUpdated

        /// <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);
            }
        }
开发者ID:punker76,项目名称:PropertyTools,代码行数:37,代码来源:DataGrid.cs

示例15: PagesListBox_SourceUpdated

 private void PagesListBox_SourceUpdated(object sender, DataTransferEventArgs e)
 {
 }
开发者ID:tuliosouza,项目名称:ASG,代码行数:3,代码来源:Thumbnails.xaml.cs


注:本文中的System.Windows.Data.DataTransferEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。