Skip to content

WPF

Silverlight, WPF and XAML programming discussions

This category can be followed from the open social web via the handle wpf@forum.codeproject.com

4.8k Topics 18.9k Posts
  • DependencyProperty fires only in ViewModel.ctor

    wpf debugging help question
    5
    0 Votes
    5 Posts
    26 Views
    I
    Dear Richard, many thanks for your help. Now it works. And I think I understand the functionality of DependencyProperty much better now. And sorry for the GitHub & 7z. I'm very new there.
  • Get Tab For Context Menu

    question wpf wcf help
    1
    0 Votes
    1 Posts
    10 Views
    No one has replied
  • TextBox Not Sizing

    wpf css wcf help question
    1
    0 Votes
    1 Posts
    10 Views
    No one has replied
  • INotifyDataErrorInfo Question

    question help
    1
    0 Votes
    1 Posts
    10 Views
    No one has replied
  • Show/Hide TextBox Watermark

    question help
    1
    0 Votes
    1 Posts
    11 Views
    No one has replied
  • DataTemplate Problem

    wpf css wcf com help
    2
    0 Votes
    2 Posts
    17 Views
    Richard DeemingR
    It sounds like you're creating two instances of the viewmodel. What does the PlayerHostView look like? "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
  • DataGrid Event Not Firing

    wpf wcf com collaboration help
    3
    0 Votes
    3 Posts
    15 Views
    K
    Andre Oosthuizen wrote: no, we will not be opening your entire project to try and find a solution. Plenty of others have. In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
  • DataGrid Exception

    css wpf wcf design help
    6
    0 Votes
    6 Posts
    19 Views
    K
    duh. Too many late nights Thanks In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
  • Custom Control Style Question Revisited

    wpf question database wcf
    3
    0 Votes
    3 Posts
    10 Views
    K
    You're missing the point. When you buy a third party control, like say from Infragistics, and you use it in your app, when you write your own theme the third party control respects it. I'm trying to understand how to make my control work the same way In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
  • UI Validation Problem

    help design question
    8
    0 Votes
    8 Posts
    27 Views
    K
    OK, I don't get what's wrong here. Here's the CustomerName in my CustomerView Here's the VM private void Customer_PropertyChanged(object sender, PropertyChangedEventArgs e) { IsChanged = true; ValidateCustomerName(); } private void ValidateCustomerName() { ClearErrors(nameof(Customer.CustomerName)); if (string.IsNullOrWhiteSpace(Customer.CustomerName)) { AddError(nameof(Customer.CustomerName), "The Customer Name cannot be empty."); } } When I clear out the CustomerName field, the ValidateCustomerName method fires, and the error is added to the errors collection. I just don't see the error text on the UI. However, if instead of binding to Customer.CustomerName, if I put a string property on the VM called CustomerName and use that, then I see the error text. In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
  • UI Validation Questions

    question csharp html wpf design
    2
    0 Votes
    2 Posts
    7 Views
    Richard DeemingR
    Quote: GetErrors method returns an IEnumerable that contains validation errors for the specified property (when the propertyName parameter isn’t equal to null or empty string) or for the entire entity (when the propertyName parameter is equal to null or empty string) If you want to validate multiple properties of your entity, you need to return the errors when the GetErrors method[^] is called with a null property name. "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
  • Custom Control Style Question

    css database wpf wcf question
    5
    0 Votes
    5 Posts
    16 Views
    K
    Huh? That's even momre confusing In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
  • .Net Core System.Windows.Data Namespace

    csharp asp-net dotnet help question
    2
    0 Votes
    2 Posts
    8 Views
    Richard DeemingR
    Breaking change: WinForms and WPF apps use Microsoft.NET.Sdk - .NET | Microsoft Learn[^] Make sure you have the correct Sdk, the correct TargetFramework, and the UseWpf properties in your project file. "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
  • 0 Votes
    1 Posts
    4 Views
    No one has replied
  • NavigationControl - Still Have A Problem

    help com docker
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • 0 Votes
    4 Posts
    14 Views
    L
    You don't need to change the zorder to put it "on top"; you just span the whole grid and then position it the way you want and add it to the (XAML) visual tree last. Or put a canvas behind it for abolute positioning. The button can be placed anywhere relative to the progress "widget" using the same priciples. As for "hit testable", you can "swallow" clicks anytime it simpifies things. (e.Handled = true or false). (If you can "close" the widget, it begs the question: how do you open it. Maybe the button should be on a top or side "command bar": an enable / disable toggle). "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
  • WPF EF Core 6 DP Question

    question csharp asp-net wpf security
    6
    0 Votes
    6 Posts
    18 Views
    Richard DeemingR
    It's a dependency, so I'd be inclined to inject the repo rather than the context. :) NB: Entity Framework supports asynchronous database queries, so it would be better to offer a FindAsync method on the repo, and get rid of the Task.Run call. public class ApplicationSecurity : IApplicationSecurity { private AppSecurityRepository _userRepo { get; } public ApplicationSecurity(AppSecurityRepository userRepo) { ArgumentNullException.ThrowIfNull(nameof(userRepo)); \_userRepo = userRepo; } public async Task LoginAsync(CredentialsEntity credentials) { var user = await \_userRepo.FindAsync(x => x.UserName == credentials.UserName); if (user is null) return null; return Cryptography.VerifyHash(credentials.Password, user.Password, user.Hash) ? user : null; } } NB2: Why does your user entity have both a Password and a Hash property? I'd expect to see a "protected password" property, and possibly a "salt" property, depending on whether the salt is stored as a separate column or combined with the password hash. "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
  • PasswordBox AcceptsReturn in a ResourceDictionary

    csharp dotnet wpf help question
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • WPF .Net Core Dependany Injection Question

    csharp wpf question asp-net dotnet
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • WPF xceed CheckcComboBox SelectAll Text

    wpf csharp help question
    3
    0 Votes
    3 Posts
    10 Views
    K
    Wonderful. Thanks In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.