當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。