Skip to Content
Exploring Windows Presentation Foundation: With Practical Applications in .NET 5
book

Exploring Windows Presentation Foundation: With Practical Applications in .NET 5

by Taurius Litvinavicius
December 2020
Intermediate to advanced
230 pages
3h 41m
English
Apress
Content preview from Exploring Windows Presentation Foundation: With Practical Applications in .NET 5
© Taurius Litvinavicius 2021
T. LitvinaviciusExploring Windows Presentation Foundationhttps://doi.org/10.1007/978-1-4842-6637-3_4

4. Files

Taurius Litvinavicius1  
(1)
Jonava, Lithuania
 

At some point with any interface technology, you will have a need to pick a file or to save one. With WPF, this is likely to be even more common, as it is the perfect interface for handling files.

Pick and Save

When it comes to C#, to access a file, you basically need to establish a FileStream. In a console app, you do it by providing string for the directory, but in WPF, there is a more user-friendly way. Now, you can do something custom; you can also get a third party, but the best way is to use the built-in option to do it.
<Grid>
        <Button x:Name="btpick" Click="Btpick_Click" ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hidden WPF: Secrets for Creating Great Applications in Windows Presentation Foundation

Hidden WPF: Secrets for Creating Great Applications in Windows Presentation Foundation

Alessandro Del Sole
Enterprise Application Development with C# 9 and .NET 5

Enterprise Application Development with C# 9 and .NET 5

Ravindra Akella, Rishabh Verma, Arun Kumar Tamirisa, Suneel Kumar Kunani, Bhupesh Guptha Muthiyalu

Publisher Resources

ISBN: 9781484266373Purchase LinkPublisher Website