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


C# Button.GetValue方法代码示例

本文整理汇总了C#中System.Windows.Controls.Button.GetValue方法的典型用法代码示例。如果您正苦于以下问题:C# Button.GetValue方法的具体用法?C# Button.GetValue怎么用?C# Button.GetValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Controls.Button的用法示例。


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

示例1: can_attach_a_message_handler_to_a_ui_element_without_data_context

        public void can_attach_a_message_handler_to_a_ui_element_without_data_context()
        {
            var dp = new Button();
            var handler = Mock<IRoutedMessageHandler>();

            _controller.AddHandler(
                dp,
                handler,
                false
                );

            var node = dp.GetValue(DefaultRoutedMessageController.NodeProperty) as InteractionNode;

            Assert.That(node, Is.Not.Null);
            Assert.That(node.MessageHandler, Is.EqualTo(handler));
            Assert.That(dp.DataContext, Is.Null);
        }
开发者ID:ssethi,项目名称:TestFrameworks,代码行数:17,代码来源:The_message_controller.cs

示例2: can_attach_a_trigger_to_a_ui_element

        public void can_attach_a_trigger_to_a_ui_element()
        {
            var dp = new Button();
            var trigger = Mock<IMessageTrigger>();

            trigger.Expect(x => x.Attach(Arg<InteractionNode>.Is.NotNull));

            _controller.AttachTrigger(
                dp,
                trigger
                );

            var node = dp.GetValue(DefaultRoutedMessageController.NodeProperty) as InteractionNode;

            Assert.That(node, Is.Not.Null);
            Assert.That(node.Triggers.Contains(trigger));
        }
开发者ID:ssethi,项目名称:TestFrameworks,代码行数:17,代码来源:The_message_controller.cs

示例3: can_attach_a_message_handler_to_a_ui_element

        public void can_attach_a_message_handler_to_a_ui_element()
        {
            var dp = new Button();
            var handler = Mock<IRoutedMessageHandler>();

            handler.Expect(x => x.Unwrap()).Return(handler);
            handler.Expect(x => x.Initialize(Arg<IInteractionNode>.Is.NotNull));

            _controller.AddHandler(
                dp,
                handler,
                true
                );

            var node = dp.GetValue(DefaultRoutedMessageController.NodeProperty) as InteractionNode;

            Assert.That(node, Is.Not.Null);
            Assert.That(node.MessageHandler, Is.EqualTo(handler));
            Assert.That(dp.DataContext, Is.EqualTo(handler));
        }
开发者ID:ssethi,项目名称:TestFrameworks,代码行数:20,代码来源:The_message_controller.cs

示例4: registerPlayerMove

 private void registerPlayerMove(Button btn)
 {
     btn.FontSize = 30.0;
     btn.Content = "X";
     int row = (int)btn.GetValue(Grid.RowProperty);
     int col = (int)btn.GetValue(Grid.ColumnProperty);
     Tuple<int, int> pickedCell = new Tuple<int, int>(row, col);
     usedCells.Add(pickedCell);
 }
开发者ID:gabrielBusta,项目名称:TfourPrototype1,代码行数:9,代码来源:MainWindow.xaml.cs

示例5: GetPopupToControl

 public static Popup GetPopupToControl(Button button)
 {
     return (Popup) button.GetValue(PopupToControlProperty);
 }
开发者ID:grarup,项目名称:SharpE,代码行数:4,代码来源:PopupHelper.cs

示例6: GetPopupAction

 public static PopupAction GetPopupAction(Button button)
 {
     return (PopupAction) button.GetValue(PopupActionProperty);
 }
开发者ID:grarup,项目名称:SharpE,代码行数:4,代码来源:PopupHelper.cs

示例7: GetResult

 public static bool? GetResult(Button button)
 {
     return (bool?)button.GetValue(ResultProperty);
 }
开发者ID:resnikb,项目名称:GitWorkflows,代码行数:4,代码来源:ButtonService.cs

示例8: GetElementToFocus

 /// <summary>
 /// Gets ElementToFocusProperty
 /// </summary>
 /// <param name="button"></param>
 /// <returns></returns>
 public static Control GetElementToFocus(Button button)
 {
     return (Control)button.GetValue(ElementToFocusProperty);
 }
开发者ID:barbarossia,项目名称:DIS,代码行数:9,代码来源:EventFocusAttachment.cs

示例9: GetIsClearTextButtonBehaviorEnabled

 public static bool GetIsClearTextButtonBehaviorEnabled(Button d)
 {
     return (bool)d.GetValue(IsClearTextButtonBehaviorEnabledProperty);
 }
开发者ID:OfficeDev,项目名称:Office-IT-Pro-Deployment-Scripts,代码行数:4,代码来源:TextBoxHelper.cs

示例10: GetTextBoxContentReceiver

 /// <summary>
 /// Gets the text box that on button click receives button's content string.
 /// </summary>
 /// <param name="button">Button whose property you're getting.</param>
 /// <returns>Text box that's receiving the content string of the button.</returns>
 public static TextBox GetTextBoxContentReceiver(Button button)
 {
     return (TextBox)button.GetValue(TextBoxContentReceiverProperty);
 }
开发者ID:KnightWhoSaysNi,项目名称:German-Dictionary,代码行数:9,代码来源:AttachedProperties.cs

示例11: GetExclusiveCase

 /// <summary>
 /// Gets CharacterCase value of ExclusiveCase property for the specified button.
 /// </summary>
 /// <param name="button">Button whose ExclusiveCase property you're getting.</param>
 public static CharacterCase GetExclusiveCase(Button button)
 {
     return (CharacterCase)button.GetValue(ExclusiveCaseProperty);
 }
开发者ID:KnightWhoSaysNi,项目名称:German-Dictionary,代码行数:8,代码来源:AttachedProperties.cs

示例12: GetCloseContainingDropDown

 public static bool GetCloseContainingDropDown(Button element)
 {
     return (bool) element.GetValue(CloseContainingDropDownProperty);
 }
开发者ID:ericschultz,项目名称:gui,代码行数:4,代码来源:ToggleDropDown.xaml.cs


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