Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help needed: Set DefaultButton for dialog
#4
Found one way to do it with wpfBuilder: XAML. Don't have a way to do it just in code yet. Seems like there should be a way to do that. But this serves my purpose. Thanks again for your help, Kevin!
 
Code:
Copy      Help
var xaml = """
<Button xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
Name="btnDefault" IsDefault="true"> OK</Button>
"""
;
Button myButton = System.Windows.Markup.XamlReader.Parse(xaml) as Button;


Best regards,
burque505


Messages In This Thread
RE: Help needed: Set DefaultButton for dialog - by burque505 - 08-30-2023, 12:41 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)