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

  • SEARCH
  • Home
  • 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 7885747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:09:00+00:00 2026-06-03T05:09:00+00:00

I am new to WPF. I have Created some user Controls with some basic

  • 0

I am new to WPF. I have Created some user Controls with some basic events, then loaded these user controls at runtime in a listview. Then I dragged and dropped these user controls on a container (Canvas).
Then I tried to store it using the XamlWriter.Save function and to reopen it with XamlReader.Load. So far so good.

The problem is that I am not getting the events when I reopened the stored XAML.
I have reads in Microsoft blogs that storing events using XamlWriter.Save is not possible. My goal is to get the events when I restore the XAML again. How can I do this?

  • 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-06-03T05:09:02+00:00Added an answer on June 3, 2026 at 5:09 am

    If serializing to and from xaml is not actually a requirement then you may want to change your strategy. Normally in WPF you want to avoid lists of controls and instead have a list of data, then template that data so that it shows up as different controls. Try binding your ListView to a collection of objects that simply represent data, and then create templates to render your controls. Your problem might be similar to the one in this question: WPF Custom control for receipt preview

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm kind of new to WPF although I have some experience in Forms, and
I am attempting to add some multi-threading to a WPF application I have created
I'm new to WPF. I have a WPF Window with a bunch of Labels
I have a WPF sorting/binding issue. (Disclaimer: I am very new to WPF and
New to wpf and through a learning curve. I have a userControl with a
I am new to WPF. I have a ListBox that has its ItemSource set
I am new to WPF. I have a code which displays a UI window
I am new to wpf and i am working on first application i have
I am NEW to WPF. I have the following XAML code: </Window> ... <Canvas>
I am new to Wpf programming. I have seen applications which have a link

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.