Click here to Skip to main content
15,033,303 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
mainwindow I have a ribbon, when selecting a tab of the ribbon cargo a user control, when pricing a button from the ribbon tab I want to execute some changes in the user control, for example change the contents of a textbox, as I do?, I can not call from the ribbon button to any function or procedure of the user control

What I have tried:

mainwindow I have a ribbon, when selecting a tab of the ribbon cargo a user control, when pricing a button from the ribbon tab I want to execute some changes in the user control, for example change the contents of a textbox, as I do?, I can not call from the ribbon button to any function or procedure of the user control
Posted
Updated 9-Aug-20 21:00pm

1 solution

If I know I will only have one instance of a given user control, I will add a public static property (called "Current") in which I store a reference to the control itself at create time. In that way, you can use the public static property to get a reference to the UC.

WPF uses the same concept; e.g. Application.Current.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900