This project has moved. For the latest updates, please go here.

Ok button on Taskdialog

Feb 8, 2009 at 7:10 PM
Hi,

I just had a go at the Taskdialog, as I was looking for exactly the functionality it provides. I ran it both on Vista and on XP, and for the Ok button I get the _ before the text. So on the button the content reads "_OK"?
Not sure how I can upload a screenshot. but the code I'm using is straighforward.
Somebody has an idea of what I'm  missing?

Thanks
    Rudi.


 

private void ButtonDialogExpander_Click(object sender, RoutedEventArgs e)

 

{

 

TaskDialog td = new TaskDialog();

 

td.Title =

"title";

 

td.Header =

"header";

 

td.Content =

"Content";

 

td.Buttons.Add(

TaskDialogButtons.OK);

 

td.MainIcon =

TaskDialogIconConverter.ConvertFrom(TaskDialogIcon.Information);

 

td.ExpansionContent =

"bla bla bla expanded";

 

td.ExpansionPosition =

TaskDialogExpansionPosition.Footer;

 

td.ExpansionButtonContent =

"Show more information";

 

td.Show();

}

Coordinator
Feb 9, 2009 at 12:32 PM
Hi Rudi,

You should be using:

td.Buttons.Add(new TaskDialogButtonData(TaskDialogButtons.OK));

Aelij.
Feb 9, 2009 at 12:37 PM
Hi Aelij,

That solves it. Thanks for the quick reply.

Rudi.