locked
[Blog Post] Hello World Sample :) RRS feed

All replies

  • Very cool!  :-)
    Friday, June 8, 2007 5:34 PM
  • So in your OnShowMessage handler you are using WPF MessageBox. However it would be cool if you used Acropolis UIService to display this message instead. And here's why: suppose you want to reuse your Part in an application that's running inside MS Outlook or webbrowser (that's only theory as there's no support for this yet :-)). It will then up to Acropolis framework to show your MessageBox using whaterver platform it's running on.

    In you part reference UIService:

    Code Snippet
    <PartFx:Part.ServiceDependencies>
      <ServiceDependency Name="uiService" ServiceType="{x:Type Microsoft.Acropolis.PartFx.IUIService}" IsRequired="True"/>
     </PartFx:Part.ServiceDependencies>

     


     

    Now you can do something like this:


    Code Snippet
                UiService.Show("Hello world!",
                                "I'm a UI-agnostic message box :-)",
                                MessageBoxButton.OK,
                                MessageBoxImage.Info);

     

    Friday, June 8, 2007 10:59 PM
  • Thanks you Alex for your valuable feedback. 

       In the second part I will modify the code to use what you point me.

     

    Cheers!

    Saturday, June 9, 2007 2:46 PM