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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:45:26+00:00 2026-06-03T05:45:26+00:00

I am creating a WPF/xaml application with WindowStyle=None So because of this I am

  • 0

I am creating a WPF/xaml application with

WindowStyle=”None”

So because of this I am having to use

    protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
    {
        base.OnMouseLeftButtonDown(e);

        // Begin dragging the window
        this.DragMove();

To make it so the window can be dragged around the screen. However I also want to make images within the window drag-able which I planned to do using

    <Image HorizontalAlignment="Right" Height="65" Width="203" Margin="0,278.271,14.434,82.5" Source="Images/Implementation1.png" Stretch="Fill">
        <i:Interaction.Behaviors>
            <ei:MouseDragElementBehavior ConstrainToParentBounds="True"/>
        </i:Interaction.Behaviors>
    </Image>

The issue is that I can’t get them both to work on the same window as they will only function if the other is switched off. Any help would be greatly appreciated.

  • 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-03T05:45:27+00:00Added an answer on June 3, 2026 at 5:45 am

    Your OnMouseLeftButtonDown is defined on the whole window, thus interfering with the trigger for MouseDragElementBehavior.

    Add a Border to your window, give it a Background (Transparent is ok, just don’t leave it without a background) and listen to MouseLeftButtonDown event on the border. Do the DragMove() in the handler for the event.

    You can put the border as a title of the window, or you can put it behind the content.

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

Sidebar

Related Questions

I'm currently creating a WPF application, using C# and XAML in Visual Studios 2010.
I'm creating a WPF application where I need to use custom fonts. A created
I am creating a simple WPF Application. I've a function OpenFile: private void OpenFile(string
I'm creating Windows application and Class library. Class library contains WPF control named InsertForm.xaml
Im creating a WPF application and just wondering is there a way to use
I'm having a problem with creating my styles for a custom wpf class. This
I am creating a wpf application where it is going to be installed on
I am having some serious trouble creating a WPF TreeView with an Object databinding.
I'm in the process of creating a message application in WPF, as part of
When creating a control style & template in Blend for a WPF application, I

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.