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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:09:02+00:00 2026-05-31T04:09:02+00:00

i am trying to implement a standard drag and drop image in wpf using

  • 0

i am trying to implement a standard drag and drop image in wpf using Rx.

var mouseDown = from evt in Observable.FromEventPattern<MouseButtonEventArgs>(image, "MouseLeftButtonDown")
                          select evt.EventArgs.GetPosition(image);

            var mouseUp = Observable.FromEventPattern<MouseButtonEventArgs>(this, "MouseLeftButtonUp");

            var mouseMove = from evt in Observable.FromEventPattern<MouseEventArgs>(this, "MouseMove")
                            select evt.EventArgs.GetPosition(this);

            var q = from startLocation in mouseDown
                    from endLocation in mouseMove.TakeUntil(mouseUp)
                    select new Point 
                    {
                        X = endLocation.X - startLocation.X,
                        Y = endLocation.Y - startLocation.Y
                    };

            q.ObserveOn(SynchronizationContext.Current).Subscribe(point =>
            {
                Canvas.SetLeft(image, point.X);
                Canvas.SetTop(image, point.Y);
            });

i get the error Error Cannot convert lambda expression to type 'System.IObserver<System.Windows.Point>' because it is not a delegate type

what am i missing ?

  • 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-31T04:09:03+00:00Added an answer on May 31, 2026 at 4:09 am

    The namespace System.Reactive.Linq contains the static class Observable which defines all the extension methods for common reactive combinators. It resides in System.Reactive.dll

    The extension methods for IObservable<T>.Subscribe such as Subscribe(onNext), Subscribe(onNext, onError) are however defined in mscorlib in the static class System.ObservableExtensions.

    tl;dr:

    • For Rx/Observable extension methods you need to import System.Reactive.Linq = using System.Reactive.Linq;
    • For Subscribe overloads you need to import System = using System;
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to trap drag and drop events from the standard Apple address
I am trying to implement a standard delete of a UITableViewCell using the standard
I have a WPF 4 application where I have implemented Drag and Drop using
trying to implement a dialog-box style behaviour using a separate div section with all
Am trying to implement a generic way for reading sections from a config file.
I'm currently trying to implement a editable details view using a grouped UITableView. I'd
I'm trying to create a new type in Clojure using deftype to implement a
I'm trying to implement an efficient hash table where collisions are solved using linear
Trying to implement the following structure from c to use NSArray in objective-c: In
I'm trying to implement some code to import user's data from another service via

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.