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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:01:50+00:00 2026-05-24T11:01:50+00:00

I have a calculated property on my View that I need to bind to

  • 0

I have a calculated property on my View that I need to bind to my ViewModel. I’m using WPF and it seems that there is no way to make a bindable property (Dependency Property) that is self calculating. I don’t want to perform the calculations whenever the View’s state changes because they are time intensive. I want to do the calculations whenever the ViewModel needs the result, i.e. when it closes.

  • 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-24T11:01:50+00:00Added an answer on May 24, 2026 at 11:01 am

    Based on your comment above, I’d use a Converter

    Your ViewModel would contain the encrypted data, and the binding to the View uses a Converter which converts it into something readable. When it’s time to save the data back to the ViewModel, use the ConvertBack method of the converter to encrypt the data again.

    <TextBox Text="{Binding EncryptedAccountNumber, 
             Converter={StaticResource DecryptTextConverter}}" />
    
    public class DecryptTextConverter: IValueConverter
    {
        public object Convert(object value, Type targetType, 
            object parameter, CultureInfo culture)
        {
            // Implement decryption code here
            return decryptedValue;
        }
    
        public object ConvertBack(object value, Type targetType, 
            object parameter, CultureInfo culture)
        {
            // Implement encryption code here
            return ecryptedValue;
        }
    }
    

    If the Encryption code takes a while, set your UpdateSourceTrigger=Explicit and manually trigger the source update when the Save button is clicked.

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

Sidebar

Related Questions

Suppose I have simple class Order, that have a TotalPrice calculated property, which can
I have the need to persist a calculated property with an aggregate root. The
I want to have a model with calculated fields that I can apply sorting
I have a label that gets updated with values calculated from information received by
I have a view that displays in a UIPopoverController. Before, it just had properties
I have a complex WPF control that for some reasons (ie. performance) is not
I have Week model that has Day as child objects. There is days relation
I have a WPF ListView inside StackPanel, with Height=Auto. It's great that it does
I have a WPF ListView inside StackPanel, with Height=Auto. It's great that it does
Given that we have the following View: <StackPanel> <TextBlock Text=Some text/> <Image Source={Binding vmImageProp}

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.