Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Could you provide me with an example of a checkbox within the AddOnFramework?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Could you provide me with an example of a checkbox within the AddOnFramework?

    Hello

    Could you help me with an example of how to implement a checkbox and its event handler within the Addons Framework, please?

    Sorry, I just need to understand at least the logic of its operation to be able to work on it.

    I have add the checkbox on xaml file:
    Code:
     <CheckBox x:Name="a" Content="Atm Auto administrado" Grid.Column="2" HorizontalAlignment="Left" Margin="0,3,0,0" Grid.Row="1" VerticalAlignment="Top" IsChecked="True"/>
    I have added this in DependencyObject LoadXAML()
    Code:
    atmAutoCheckbox = LogicalTreeHelper.FindLogicalNode(page, "atmAutoCheckBox") as CheckBox;
    if (atmAutoCheckbox != null)
    {
    atmAutoCheckbox.Checked += OnCheckBoxChange;
    }
    I have added this method to handle de events if the checkbox is checked or unchecked
    Code:
    private void OnCheckBoxChange(object sender, RoutedEventArgs e)
    {
    }
    But I need a little help so that the events reach the OnCheckBoxChange method.

    ¿Could you give me a hand, please?

    #2
    Hello jleira,

    What you have appears correct for the Checked event. There is also an Unchecked event.

    How do you this code is not being run when the box is checked? Do you have print that is not appearing?
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Leeroy_Jenkins, Today, 01:32 AM
    2 responses
    12 views
    0 likes
    Last Post Leeroy_Jenkins  
    Started by MatthewLesko, Yesterday, 07:59 PM
    1 response
    15 views
    0 likes
    Last Post StealthM93  
    Started by RookieKiwi, Yesterday, 06:53 PM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_EricB  
    Started by Skyfly1715, Yesterday, 08:10 PM
    2 responses
    8 views
    0 likes
    Last Post s.kinra
    by s.kinra
     
    Started by max333, Yesterday, 09:05 PM
    0 responses
    6 views
    0 likes
    Last Post max333
    by max333
     
    Working...
    X