I created a toolbar, e.g. the BaseMap Switch tool bar that allows me to switch from one basemap to another. Then I created a control toolbar. By clicking a button, the BaseMap Switch toolbar can be either expanded or collapsed.
I wrote a piece of code (see below), but I don't know how to set the value for the BaseMap Toolbar's visibility (or something else).
If you have the experience, please share it with me. Thanks.
private void SetTool(Button btn)
{
_Parent = (MainPage)System.Windows.Application.Current.RootVisual;
_Parent.UnsetTool();
btn.Background = (Brush)Application.Current.Resources["ButtonHighlightBrush"];
_btnCurrentTool = btn;
if (btn == btnMapSwitch)
{
//_Parent.MyBaseMaps.Visibility = "Collapse"; // can't be a string, what should be?
}
...
}