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 Radano, 06-10-2021, 01:40 AM
    19 responses
    604 views
    0 likes
    Last Post Radano
    by Radano
     
    Started by KenneGaray, Today, 03:48 AM
    0 responses
    3 views
    0 likes
    Last Post KenneGaray  
    Started by thanajo, 05-04-2021, 02:11 AM
    4 responses
    470 views
    0 likes
    Last Post tradingnasdaqprueba  
    Started by aa731, Today, 02:54 AM
    0 responses
    5 views
    0 likes
    Last Post aa731
    by aa731
     
    Started by Christopher_R, Today, 12:29 AM
    0 responses
    10 views
    0 likes
    Last Post Christopher_R  
    Working...
    X