Select to view content in your preferred language

How to Collapse magnifyingGlass

738
2
10-07-2010 04:45 AM
ShaningYu
Honored Contributor
Scenario Desription:
1) Created MagifyingGlass.xaml and loaded ESRI's sample code in http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#MagnifyingGlass
2) Created a button on the toolbar for the MagnifyingGlass tool
   if (btn == btnMagnifyingGlass) {
         // if it is collapsed
         _Parent.ShowMagnifyingGlass();
   }
   and
        public void ShowMagnifyingGlass()  {
            MyMagnifyingGlass.Visibility = Visibility.Visible;
        }

Questions:
1) How to check whether the tool is collapsed or not (can't do like that: MyMagnifyingGlass.Visibility.Collapsed )?
2) How to set the tool Collapsed or Visible?

Thanks.
0 Kudos
2 Replies
JenniferNery
Esri Regular Contributor
The MagnifyingGlass is just like any other Control. It's Visibility can be checked and set just as you would any other Control.

Questions:
1) How to check whether the tool is collapsed or not (can't do like that: MyMagnifyingGlass.Visibility.Collapsed )?

if (this.MyMagnifyingGlass.Visibility == System.Windows.Visibility.Collapsed) 


2) How to set the tool Collapsed or Visible?

   this.MyMagnifyingGlass.Visibility = System.Windows.Visibility.Visible;
0 Kudos
ShaningYu
Honored Contributor
Thanks!  Jenniffer.  You are very helpful!!!
0 Kudos