本文整理汇总了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;
// }
//}
}
示例2: SliderOpponentOpacity_ValueChanged
private void SliderOpponentOpacity_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
{
if(!_initialized)
return;
Config.Instance.OpponentOpacity = SliderOpponentOpacity.Value;
SaveConfig(true);
}
示例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));
}
}
示例4: TreeView1_SelectedItemChanged
private void TreeView1_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
{
TreeViewClass t = TreeView1.SelectedItem as TreeViewClass;
this.Model.SelectedImage(t.directoryPath);
}
示例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();
}
示例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);
}
示例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;
}
}
}
示例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;
}
}
示例9: zoomSlider_ValueChanged_1
private void zoomSlider_ValueChanged_1(object sender, RoutedPropertyChangedEventArgs<double> e)
{
if (zoomSlider != null)
{
map1.ZoomLevel = zoomSlider.Value;
}
}
示例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;
}
示例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);
}
}
}
示例12: Slider_ValueChanged
private void Slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
{
F1 = Convert.ToInt32(slider.Value);
showColumnChart();
textb.Text = slider.Value.ToString();
}
示例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;
}
}
示例14: bar_SelectedSectionChanged
private void bar_SelectedSectionChanged(object sender, RoutedPropertyChangedEventArgs<Odyssey.Controls.OutlookSection> e)
{
if (IsInitialized)
{
label.Text = e.NewValue.Header.ToString();
}
}
示例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);
}