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


C# Core.FindResource方法代码示例

本文整理汇总了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);
        }
开发者ID:aquarius20th,项目名称:CSharp_TUM.CMS.VPLControl,代码行数:25,代码来源:IntegerSlider.cs

示例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);
        }
开发者ID:aquarius20th,项目名称:CSharp_TUM.CMS.VPLControl,代码行数:25,代码来源:DoubleSlider.cs

示例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);
        }
开发者ID:tumcms,项目名称:TUM.CMS.VPLControl,代码行数:24,代码来源:ColorNode.cs


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