Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Powershell WPF (XAML) GUI: Hide WPF button on second WPF GUI - on load of second GUI

$
0
0

All,

Thanks for viewing this post. I'll try to be as clear as I can in describing what I have and am trying to do.

I have a WPF GUI built in Visual Studio, XAML Code. I added this code to Powershell. I have 2 buttons on the form - powershell coded - doing 2 separate tasks however each button calls a second WPF GUI form.

The second form - also XAML code - displays a textbox and 2 buttons. Each button on form 2 performs the two separate tasks.

I would like to hide the buttons depending on which button on form 1 is selected.

 

For example: MainForm and Display_User_ID_Form

MainForm

Button 1: Rebuild_User_Profile

Button 2: Add_ID_RD_Group


Display_User_ID_Form

Textbox (for user ID)

Button 1: Rebuild_User_Profile

Button 2: Add_ID_RD_Group

 

If MainForm.Rebuild_User_Profile is pressed 2 things should happen, 1) Display_User_ID_Form loads and 2) Hide Display_User_ID_Form.Add_ID_RD_Group button

 

If MainForm.Add_ID_RD_Group is pressed 2 things should happen, 1) Display_User_ID_Form loads and 2) Hide Display_User_ID_Form.Rebuild_User_Profile button

 

If you have any questions please let me know.

 

Thanks!


Viewing all articles
Browse latest Browse all 6937

Trending Articles