I have a basic control that will be used in different areas. It has a couple of toolbars on it. I need to be able to add buttons to the toolbars in the control later on and I can do this right now no problem through code.
What I would like to be able to do is add the buttons in the XAML file like so
as shown below, by adding a property ( Toolbar1 ) to my Control and returning the Items in the RadToolBar I am able to have the above code working, events fire and everything in general works just as you would expect.
The problem I am having is I would like to be able to access the buttons for enabling and disabling using the names declared in the XAML file. but when I try to do this the controls are null. the Items in the toolbar they are declared under are not null.
Is there a way to make sure the controls I declared are not null so that I can access the buttons or any other control from the name I have given it?