Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7005393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:20:42+00:00 2026-05-27T21:20:42+00:00

I am very new to programming, so please forgive me if this question seems

  • 0

I am very new to programming, so please forgive me if this question seems so basic. I have developed my first application – an xps viewer. What I want to achieve is to be able to allow the user to select which document to open from a range of options that I have predefined in a combo box.

I’ve searched all over the net and can’t find an article that shows me how to do this. MSDN is bit too cryptic for me at this moment, so I get confused. Your help would be greatly appreciated.

PS> I think I’m using the FixedDocumentViewer (hope I wrote it right). Thanks.

Kismet

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:20:43+00:00Added an answer on May 27, 2026 at 9:20 pm

    Assuming that this is a WPF application, you would add a button to your form and add a Click event to that button (select the button in the designer, show the Properties, select the Events tab in the Properties, and double-click in the empty column on the Click line).

    Also assuming that the combobox contains the name of the file to show the user, the button click event would look something like:

    Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click
        Try
            Dim sFileName As String
    
            sFileName = DirectCast(ComboBox1.SelectedValue, String)
            If Not String.IsNullOrEmpty(sFileName) Then
                Dim theDocument As New System.Windows.Xps.Packaging.XpsDocument(sFileName, System.IO.FileAccess.Read)
    
                documentViewer1.Document = theDocument.GetFixedDocumentSequence()
            End If
        Catch ex As Exception
            MessageBox.Show("Exception: " & ex.Message)
        End Try
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I’m very new to programming with RSS feeds to please forgive me if this
I'm new to programming so please forgive me if this is a dumb question...
I think this is a very simple question, but I’m new to programming so
I'm very much new to programming and have been doing fairly well so far.
I am very new at all this c# Windows Phone programming, so this is
First off I am very new to Objective C and iPhone programming. Now that
I am very new to programming in FLEX. I have inherited a FLEX 4
I'm very new to programming and I must be missing something here. The first
Please be gentle, I'm very new to programming and only own one book which
I am very new to programming and I am using Java as my first

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.