Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 WHICKED, Today, 12:45 PM
    2 responses
    16 views
    0 likes
    Last Post WHICKED
    by WHICKED
     
    Started by GussJ, 03-04-2020, 03:11 PM
    15 responses
    3,271 views
    0 likes
    Last Post xiinteractive  
    Started by Tim-c, Today, 02:10 PM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by Taddypole, Today, 02:47 PM
    0 responses
    2 views
    0 likes
    Last Post Taddypole  
    Started by chbruno, 04-24-2024, 04:10 PM
    4 responses
    51 views
    0 likes
    Last Post chbruno
    by chbruno
     
    Working...
    X