Declined
Last Updated: 14 Aug 2023 12:47 by ADMIN
Devel
Created on: 16 Jun 2023 04:34
Category: UI for WPF
Type: Bug Report
1
PdfViewer: Make sure all properties are rising PropertyChanged event
Make sure all properties are rising OnPropertyChanged event.
7 comments
ADMIN
Dimitar
Posted on: 14 Aug 2023 12:19

Hi Devel,

I have discussed this with the team and we believe that this is not connected to this issue. I would suggest opening a new ticket which is a private thread where you can attach a sample project that repoduces this. This will allow us to properly investigate and propose a solution. 

Thank you in advance for your patience and cooperation. 

Regards,
Dimitar
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Devel
Posted on: 09 Aug 2023 12:22

For client application we are using extensively ReactiveUI with Akavache.

 

I will post the method used to cache user selections:

```

    public static IObservable<TProp?> PersistValue<T, TProp>(
        this T vm,
        Expression<Func<T, TProp?>> propertyExpression,
        Func<TProp?, bool>? canCache = null)
        where T : class
        where TProp : notnull
    {
        var key = propertyExpression.GetPropertyPath();
        return Observable.Create<TProp?>(observer =>
        {
            var d = new CompositeDisposable();

            BlobCache.UserAccount.GetObject<TProp?>(key)
                .Catch(Observable.Return(default(TProp)))
                .ObserveOnMainThread()
                .Do(observer.OnNext)
                .BindTo(vm, propertyExpression)
                .DisposeWith(d);

            vm.WhenAnyValue(propertyExpression)
                .Skip(1)
                .Where(x => canCache is null || canCache(x))
                .DistinctUntilChanged()
                .Do(observer.OnNext)
                .Select(prop => BlobCache.UserAccount.InsertObject(key, prop, TimeSpan.FromDays(30)))
                .Concat()
                .Subscribe()
                .DisposeWith(d);

            return d;
        });
    }

```

 

And I want to cache for instance PdfViewer.Mode.

 

I see no real reason why the dependecny property should not work and it should be fixed.

ADMIN
Dimitar
Posted on: 09 Aug 2023 11:46

Hi Devel,

Can you describe your requirements in detail? Which properties do you need the event for? What do you want to achieve in this case?

I have reviewed our code and it turns out the PropertyChenged event was never used and nobody ever needed this or noticed that it does not work. 

Thank you in advance for your patience and cooperation. I am looking forward to your reply.

Regards,
Dimitar
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Devel
Posted on: 09 Aug 2023 05:27

Is there any real reason why the PropertyChanged should not be raised?

 

We have caching functionality for dependency properties, which is core function of WPF. And this breaks it. We are not looking forward to rewrite it into event based caching. In addition, not every DP has its own event.

 

ADMIN
Dimitar
Posted on: 17 Jul 2023 07:48

Hello Devel,

We are aware that the PropertyChanged event is not raised. You should use a different approach in this case. I have attached a small project that shows this. 

Let me know how this works for you.

Regards,
Dimitar
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Attached Files:
Devel
Posted on: 14 Jul 2023 13:25
Hello, I know, I ded check that, but the control is not raising the change event. You can check the original support ticket for me regarding this.
ADMIN
Dimitar
Posted on: 14 Jul 2023 10:51

Hello,

After we investigated this we found that all of the properties in this control are dependency properties. In this case, there is no need for the  PropertyChanged event since one can use the following approach to track the changes: c# - How to subscribe to change DependencyProperty?.In addition, we have events for most of the properties. 

Thank you for your understanding.

Regards,
Dimitar
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.