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


C# RoutedPropertyChangedEventArgs类代码示例

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


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

示例1: OnSelectionChanged

        private void OnSelectionChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
        {
            // TODO: save latest visited designs to a last viewed items list

            //if (menuViewAutoSelect.IsChecked)
            //{
            //    var dataSource = this.ViewModel;
            //    try
            //    {

            //        var source = e.OriginalSource;
            //        var newValue = e.NewValue;

            //        //var desktopSelectedItem = (from i in (IEnumerable<DirectoryInfo>)tvDesktop.Items where i.Name.EndsWith(newValue.ToString().ToLower().Replace("mobile", "")) select i);
            //        var desktopItem = (from s in dataSource.Desktop where s.Name.ToString().ToLower().Replace("desktop", "").Replace(" ", "").Replace("_", "").Replace("-", "").EndsWith(newValue.ToString().ToLower().Replace("mobile", "").Replace(" ", "").Replace("_", "").Replace("-", "")) select s).FirstOrDefault();
            //        if (desktopItem == null)
            //        {
            //            desktopItem = dataSource.Desktop.FirstOrDefault(s => s.Name.EndsWith(".png"));
            //        }
            //    }
            //    catch (Exception)
            //    {

            //        //throw;
            //    }
            //}
        }
开发者ID:danuw,项目名称:Responsive-Design-Explorer,代码行数:27,代码来源:MainWindow.xaml.cs

示例2: SliderOpponentOpacity_ValueChanged

		private void SliderOpponentOpacity_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
		{
			if(!_initialized)
				return;
			Config.Instance.OpponentOpacity = SliderOpponentOpacity.Value;
			SaveConfig(true);
		}
开发者ID:Jarraximus,项目名称:Hearthstone-Deck-Tracker,代码行数:7,代码来源:OverlayOpponent.xaml.cs

示例3: trkViscosity_ValueChanged

		private void trkViscosity_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
		{
			if (this.ValueChanged != null)
			{
				this.ValueChanged(this, new FluidEmulationArgs(chkFluid.IsChecked.Value, trkViscosity.Value));
			}
		}
开发者ID:charlierix,项目名称:AsteroidMiner,代码行数:7,代码来源:FluidEmulation.xaml.cs

示例4: TreeView1_SelectedItemChanged

 private void TreeView1_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
 {
     
     TreeViewClass t = TreeView1.SelectedItem as TreeViewClass;
     this.Model.SelectedImage(t.directoryPath);
     
 }
开发者ID:fujikuraiori,项目名称:My1st,代码行数:7,代码来源:MainWindow.xaml.cs

示例5: lookUpTree_SelectedItemChanged

 private void lookUpTree_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
 {
     if (lookUpTree.SelectedItem.GetType() != typeof(TreeViewItem)) return;
     TreeViewItem item  = (TreeViewItem)lookUpTree.SelectedItem;
     if (item == null || item.DataContext == null) return;
     txtTreeSelect.Text = item.DataContext.ToString();
 }
开发者ID:JuRogn,项目名称:OA,代码行数:7,代码来源:LookupTreeForm.xaml.cs

示例6: NavigationMenu_SelectedItemChanged

        private void NavigationMenu_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
        {
            if (NavigationMenu.SelectedItem == null) return;

            var pages = new List<string>
            {
                "CumulativePL",
                "CumulativeReturns",
                "CapitalUsage",
                "PerTradeStats",
                "PortfolioStats",
                "PLByMonth",
                "PnLByTags",
                "StrategyCorrelations",
                "Benchmarking",
                "TradeRetDistributions",
                "MAEMFE",
                "AvgCumulativeRets",
                "DailyRetDistributions",
                "TradeLengths",
                "LengthVsReturns",
                "SizingVsReturns",
                "TradeProfitsByDayHour",
                "RealizedPLByInstrument",
                "ROACByInstrument",
                "GrossMovementCapture",
                "CashTransactions",
                "ACFPACF",
                "Risk",
                "MonteCarlo",
                "BacktestComparison"
            };
            var title = (string)((TreeViewItem)NavigationMenu.SelectedItem).Tag;
            MainTabCtrl.SelectedIndex = pages.IndexOf(title);
        }
开发者ID:QANTau,项目名称:QPAS,代码行数:35,代码来源:PerformanceReportWindow.xaml.cs

示例7: OpacitySlider_ValueChanged

 /// <summary>
 /// Opacity adjustment slider
 /// </summary>
 private void OpacitySlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
 {
     if (isLoaded)
     {
         Slider s = sender as Slider;
         string layer = s.Name.Replace("slider", "layer");
         if (_map.FindName(layer).GetType().Equals(typeof(MapTileLayer)))
         { //tiles
             MapTileLayer ml = _map.FindName(layer) as MapTileLayer;
             if (ml != null) ml.Opacity = e.NewValue;
         }
         else if (_map.FindName(layer.Replace("layer", "tile")) != null)
         {   //hybrid - Tiles and XAML
             MapTileLayer mtl = _map.FindName(layer.Replace("layer", "tile")) as MapTileLayer;
             if (mtl != null) mtl.Opacity = e.NewValue;
             MapLayer ml = _map.FindName(layer) as MapLayer;
             if (ml != null) ml.Opacity = e.NewValue;
         }
         else
         {  // WKT and XAML
             MapLayer ml = _map.FindName(layer) as MapLayer;
             if (ml != null) ml.Opacity = e.NewValue;
         }
     }
 }
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:28,代码来源:Layers.xaml.cs

示例8: AutoCompleteComboBox_DropDownClosed

 /// <summary>
 /// 关闭下拉的时候进行判断,如果没有选择(既不合法的字典)时,把文本框清空
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void AutoCompleteComboBox_DropDownClosed(object sender, RoutedPropertyChangedEventArgs<bool> e)
 {
     if (this.SelectedItem == null && this.SearchText == string.Empty)
     {
         this.Text = string.Empty;
     }
 }
开发者ID:JuRogn,项目名称:OA,代码行数:12,代码来源:AutoCompleteComboBox.cs

示例9: zoomSlider_ValueChanged_1

 private void zoomSlider_ValueChanged_1(object sender, RoutedPropertyChangedEventArgs<double> e)
 {
     if (zoomSlider != null)
     {
         map1.ZoomLevel = zoomSlider.Value;
     }
 }
开发者ID:ZeynepCamurdan,项目名称:maps-samples,代码行数:7,代码来源:MainPage.xaml.cs

示例10: EngineSelected

        private void EngineSelected(object sender, RoutedPropertyChangedEventArgs<object> e)
        {
            var value = (Engine)e.NewValue;
            if (value.Name == "Browse...")
            {
                var list = sender as RibbonGallery;
                var category = list.Items[0] as RibbonGalleryCategory;
                var filename = OpenFileDialog("Chess Engine|*.exe");

                if (filename != null)
                {
                    IEditableCollectionViewAddNewItem items = category.Items;
                    if (items.CanAddNewItem)
                    {
                        object newitem = items.AddNewItem(new Engine(filename));
                        items.CommitNew();
                        list.SelectedItem = newitem;
                    }
                }
                else
                    list.SelectedItem = category.Items[0];
            }
            else
                ChessEngine.Path = value.Path;
        }
开发者ID:Maniulo,项目名称:GameWarden,代码行数:25,代码来源:Statistics.cs

示例11: Slider_Rotate_ValueChanged

        private void Slider_Rotate_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
        {
            double angle = e.NewValue;
            Element element = Slider_Rotate.Tag as Element;
            if (element != null)
            {
                RotateTransform rotateTransform = new RotateTransform(angle, element.ActualWidth / 2, element.ActualHeight / 2);
                element.RenderTransform = rotateTransform;

                CompositeElement compElement = element as CompositeElement;
                if (compElement != null &&
                    compElement.RelativeElement != null &&
                    compElement.IsMerged)
                {
                    CompositeElement relativeElement = compElement.RelativeElement;
                    double height1 = element.ActualHeight - 7;
                    double height2 = 0;
                    if (compElement.CompositeLocation == CompositeLocation.Bot)
                    {
                        height1 = 0;
                        height2 = compElement.RelativeElement.ActualHeight - 7;
                    }
                    RotateTransform rotateTransform1 = new RotateTransform(angle, element.ActualWidth / 2, height1);
                    element.RenderTransform = rotateTransform1;

                    if (compElement.RootSeal != null)
                    {
                        compElement.RootSeal.RenderTransform = rotateTransform1;
                    }
                    RotateTransform rotateTransform2 = new RotateTransform(angle, relativeElement.ActualWidth / 2, height2);//element.ActualWidth / 2, -(element.ActualHeight + relativeElement.ActualHeight) / 2);
                    compElement.RelativeElement.RenderTransform = rotateTransform2;
                    //RenderTransformOrigin = new Point(element.ActualWidth / 2, (element.ActualHeight + compElement.ActualHeight) / 2);
                }
            }
        }
开发者ID:steamprodz,项目名称:DantistApp,代码行数:35,代码来源:RotatingWindow.xaml.cs

示例12: Slider_ValueChanged

        private void Slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
        {
            F1 = Convert.ToInt32(slider.Value);
            showColumnChart();

            textb.Text = slider.Value.ToString();
        }
开发者ID:k0enV,项目名称:school_project,代码行数:7,代码来源:MainWindow.xaml.cs

示例13: ColorAdjuster_OnValueChanged

 private void ColorAdjuster_OnValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
 {
     var index = EffectAdjusterContainer.SelectedIndex;
     switch (index)
     {
         case 0:
             var linearBrush = new LinearGradientBrush(new GradientStopCollection(new List<GradientStop>()
             {
                 new GradientStop(Colors.Red,0),
                 new GradientStop(Colors.Blue,e.NewValue),
                 new GradientStop(Colors.Black,1)
             }));
             RaiseEvent(linearBrush);
             break;
         case 1:
             var radialBrush = new RadialGradientBrush(new GradientStopCollection(new List<GradientStop>()
             {
                 new GradientStop(Colors.Red,0),
                 new GradientStop(Colors.Blue,e.NewValue),
                 new GradientStop(Colors.Black,1)
             }));
             RaiseEvent(radialBrush);
             break;
     }
 }
开发者ID:erdao,项目名称:Temp,代码行数:25,代码来源:ForegroundSetter.xaml.cs

示例14: bar_SelectedSectionChanged

 private void bar_SelectedSectionChanged(object sender, RoutedPropertyChangedEventArgs<Odyssey.Controls.OutlookSection> e)
 {
     if (IsInitialized)
     {
         label.Text = e.NewValue.Header.ToString();
     }
 }
开发者ID:jogibear9988,项目名称:OdysseyWPF,代码行数:7,代码来源:Outlook.xaml.cs

示例15: TreeViewSelectedItemChanged

        private void TreeViewSelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
        {
            var oldValue = e.OldValue as PlaylistNavigationItem;
            var newValue = e.NewValue as PlaylistNavigationItem;

            Model.SelectedItemChanged(oldValue, newValue);
        }
开发者ID:krikelin,项目名称:torshify-client,代码行数:7,代码来源:PlaylistNavigationView.xaml.cs


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