Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

On click of Ribbon button hide popup and disable toggle button

$
0
0

Hi All,

I have Ribbon Buttons click, on click of one ribbon button a page is shown with toggle button. When I click on this toggle button one Popup gets displayed. Similarly I want for other ribbon button click this toggle button should be enable and Popup must also be PopUp.Isopen = false; or PopUp.Visibility = Visibility.Hidden; ToggleButton.IsEnabled = false;

when I'm debugging my code I can check that the above functionality is working but I'm able to view the changes in the Word Document.

Below is my code.

public void GetCtrlvalue(string ctrl)
        {
if (ctrl == "menu")
            {
                ToggleButton.IsEnabled = true;

                Popup.Visibility = Visibility.Visible;

                Popup.IsOpen = true;            

            }          


else if (ctrl != "menu")

            {
                ToggleButton.Visibility = System.Windows.Visibility.Hidden;

                ToggleButton.IsEnabled = false;

                Popup.Visibility = Visibility.Collapsed;

                Popup.IsOpen = false;              

            }

             ToggleButton.InvalidateVisual();
     this.InvalidateVisual();

        }


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>