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 7796911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T23:31:02+00:00 2026-06-01T23:31:02+00:00

I got a Silverlight page opening a dialog. It is an administration page with

  • 0

I got a Silverlight page opening a dialog. It is an administration page with some advanced logic talking to a database over a webservice. For the Silverlight client side, we use MVVM to its fullest. Opening the dialog the first time, everything works fine according to the implemented logic.

The problem: The second time opening the dialog, our data bound setters start receiving the wrong values.

Code:

How the dialog is created:

MyPopupViewModel myPopup = new MyPopupViewModel();
Caliburn.Micro.Execute.OnUIThread(() => WindowManager.ShowDialog(myPopup));

One of the bindings that eventually get the wrong values:

<ComboBox
    ItemsSource="{Binding YesNoItems}"
    SelectedValue="{Binding IsSynchronizing, Mode=TwoWay, Converter={StaticResource BooleanToYesNoConverter}}"
    />

What I have tried:

  • I put breakpoints in the setters. This is how I realized the logic is correct but that the setter is called with other values the second time it is opened.

  • I found the getters being called {1, 2, 1} times the {1st, 2nd, 3rd} time they are opened.

  • I made sure the dialog is initialized each time. Maybe Caliburn-micro caches the old one somehow, but it apparently does not cache it for long, as it works fine again the third time it is opened.

  • 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-01T23:31:04+00:00Added an answer on June 1, 2026 at 11:31 pm

    Solved it by adding the following decorator in the constructor of the dialog View, in the code-behind. I already had that decorator in the ViewModel, but the View apparently needed it too.

    PartCreationPolicy(CreationPolicy.NonShared)]
    

    A colleague helped me to find this out by breakpointing and then setting an ID for each instance. That way we proved there were several instances. Very practical. So the Views needed to be told to recreate each time instead of being reused.

    The final code-behind looks like this:

    [Export]
    [PartCreationPolicy(CreationPolicy.NonShared)]
    public partial class MyPopupView
    {
        public MyPopupView()
        {
            InitializeComponent();
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We've got a client who wants to use a SilverLight application hosted on our
i've got a silverlight (v2) datagrid where some items are section headers and as
I've got a silverlight view (for lack of a better work) with some text
I’ve got a Silverlight 3 DataForm which is adding some odd padding to the
I've got a Silverlight Page with a combo box and text box. The Text
I've got a silverlight app. The app draws an image, then on top of
I've got two Silverlight 4.0 ComboBoxes; the second displays the children of the entity
I've got the Silverlight app with 4 pages(wizard). Usually user goes throught these 4
I've got a Silverlight application with one Silverlight project and a host web project.
I've got a single Silverlight app that I'd like to display in a grid.

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.