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 funk10101, Today, 12:02 AM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by GLFX005, Today, 03:23 AM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by nandhumca, Yesterday, 03:41 PM
    1 response
    13 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by The_Sec, Yesterday, 03:37 PM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by vecnopus, Today, 06:15 AM
    0 responses
    1 view
    0 likes
    Last Post vecnopus  
    Working...
    X