On my application i have 3 stackpanels that their visibility is binding to 3 radio button – in case radio button A is checked => stackpanel A1 is visible …
I want to define some variable that will be call CurrentStackPanelInFocus that will be bind to the stackpanel that is visible.
I dont know how to do it.
I know how to write the convert – but i dont know how to do the binding.
Thanks for any help.
( the code is silverlight )
If I am reading your question correctly… Create a visibility converter, based on the standard one you see hundreds of times, then make the following changes:
enum StackPanelType{ Panel1, Panel2, Panel3}){Binding Path=CurrentStackPanelInFocus...})e.g
{Binding Path=CurrentStackPanelInFocus, Convertor="{StaticResource PanelConverter}" ConverterParameter="Panel1"}