本文整理汇总了C#中Core.FindResource方法的典型用法代码示例。如果您正苦于以下问题:C# Core.FindResource方法的具体用法?C# Core.FindResource怎么用?C# Core.FindResource使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Core
的用法示例。
在下文中一共展示了Core.FindResource方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IntegerSlider
public IntegerSlider(Core.VplControl hostCanvas)
: base(hostCanvas)
{
AddOutputPortToNode("Number", typeof(int));
SliderExpanderInteger expander = new SliderExpanderInteger
{
Style = hostCanvas.FindResource("ExpanderSliderStyleInteger") as Style,
SliderValue = 5,
SliderMax = 10,
SliderMin = 0,
SliderStep = 1
};
var b2 = new Binding("Data")
{
Mode = BindingMode.OneWayToSource,
Source = OutputPorts[0]
};
expander.SetBinding(SliderExpanderInteger.SliderValueProperty, b2);
Name = "Integer slider";
AddControlToNode(expander);
}
示例2: DoubleSlider
public DoubleSlider(Core.VplControl hostCanvas)
: base(hostCanvas)
{
AddOutputPortToNode("Number", typeof(double));
SliderExpanderDouble expander = new SliderExpanderDouble
{
Style = hostCanvas.FindResource("ExpanderSliderStyleDouble") as Style,
SliderValue = 5,
SliderMax = 10,
SliderMin = 2,
SliderStep = 0.01
};
var b2 = new Binding("Data")
{
Mode = BindingMode.OneWayToSource,
Source = OutputPorts[0]
};
expander.SetBinding(SliderExpanderDouble.SliderValueProperty, b2);
Name = "Double slider";
AddControlToNode(expander);
}
示例3: ColorNode
public ColorNode(Core.VplControl hostCanvas)
: base(hostCanvas)
{
AddOutputPortToNode("Color", typeof (Color));
expander = new ExpanderColor
{
Style = hostCanvas.FindResource("ExpanderColorStyle") as Style
};
cc = new ColorCanvas
{
Background = Brushes.White,
BorderBrush = Brushes.White
};
expander.Content = cc;
cc.SelectedColorChanged += cc_SelectedColorChanged;
cc.SelectedColor = Colors.LightGray;
AddControlToNode(expander);
}