Skip to content

LaunchUriOrFileAction

branh edited this page Dec 4, 2018 · 1 revision

LaunchUriOrFileAction opens a file or website using the default program for that file type.

This behavior opens the file or uri at the given Path when triggered unless IsEnabled is set to false.

Sample Code

Xaml

<Button x:Name="button">
  <Behaviors:Interaction.Triggers>
    <Behaviors:EventTrigger EventName="Click" SourceObject="{Binding ElementName=button}">
      <Behaviors:LaunchUriOrFileAction Path="https://www.visualstudio.com" />
    </Behaviors:EventTrigger>
  </Behaviors:Interaction.Triggers>
</Button>