Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <TextBlock>
- <Hyperlink Click="openFile_Click">Open File</Hyperlink>
- </TextBlock>
- var appPath = System.AppDomain.CurrentDomain.BaseDirectory;
- private void openFile_Click(object sender, RoutedEventArgs e)
- {
- System.Diagnostics.Process.Start(appPath + "myFile.txt");
- }
- <TextBlock>
- <Hyperlink Click="Hyperlink_Click">Click Me..!!</Hyperlink>
- </TextBlock>
- private void Hyperlink_Click(object sender, RoutedEventArgs e)
- {
- System.Diagnostics.Process.Start("filePath");
- }
- System.Diagnostics.Process.Start("..\..\ABC.txt");
- System.Diagnostics.Process.Start("ABC.txt");
- <TextBlock>
- <Hyperlink Command="{Binding CommandPath}" CommandParameter=" {Binding Path=RecordID}">
- <TextBlock Text="Open File" />
- </Hyperlink>
- </TextBlock>
- public ICommand CommandPath { get { return new DelegateCommand(HyperlinkClick); } }
- private void HyperlinkClick()
- {
- Process.Start(@"notepad.exe", @"C:TEST_FILE.txt");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement