WPF Canvas.SetLeft and Canvas.SetTop for Image control gets random position

I just set image to WPF Image, and set up Canvas.SetLeft and Canvas.SetTop. But Canvas.SetLeft and Canvas.SetTop doesn't work properly.

I have checked height and width of the parent that control this image. It always shows the same value, but position of image is coming out to be random.

How can I load image initial position to the center of the canvas?

Here is my XAML code that contains Image

<Border x:Name="brdimg"  Grid.Column="1" BorderThickness="2" 
BorderBrush="DarkSlateGray" Margin="5" >
        <Canvas x:Name="canvas_Zoom" Grid.Column="1" ClipToBounds="True" >
            <Canvas x:Name="canvas_Draw" MouseWheel="Canvas_MouseWheel"  >
                <Image x:Name="imgBack" 
MouseLeftButtonDown="imgBack_MouseLeftButtonDown" 
MouseMove="imgBack_MouseMove" MouseLeftButtonUp="imgBack_MouseLeftButtonUp" 
/>
            </Canvas>
        </Canvas>
    </Border>

full code:

       public partial class MainWindow : Window
{
    bool IsOrigonalImg= false;

    double ZoomMax = 10;
    double ZoomMin = 0.1;
    double ZoomSpeed = 0.001;
    double Zoom = 1;

    Point FirstPos = new Point();
    MImg SrcMImg;

    public MainWindow()
    {
        InitializeComponent();
        InitParam();

        canvas_Zoom.Height = brdimg.ActualHeight;
        canvas_Zoom.Width = brdimg.ActualWidth;

        canvas_Draw.Height = brdimg.ActualHeight;
        canvas_Draw.Width = brdimg.ActualWidth;



    }


    #region event

    private void btnLoad_Click(object sender, RoutedEventArgs e)
    {
        OpenFileDialog ofd = new OpenFileDialog();
        if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
        {

            imgBack.Source = new BitmapImage(new Uri(ofd.FileName));


            var offsetH = (imgBack.ActualHeight - brdimg.ActualHeight) / 2.0;
            var offsetW = (imgBack.ActualWidth - brdimg.ActualWidth) / 2.0;


            brdimg.ActualHeight.Print("border H");
            brdimg.ActualWidth.Print("border W");


            canvas_Zoom.ActualHeight.Print("canvas_Zoom H");
            canvas_Zoom.ActualWidth.Print("canvas_Zoom W");


            canvas_Draw.ActualHeight.Print("canvas_Draw H");
            canvas_Draw.ActualWidth.Print("canvas_Draw W");


            imgBack.ActualHeight.Print("img H");
            imgBack.ActualWidth.Print("img W");




            Canvas.SetLeft(imgBack, offsetW);
            Canvas.SetTop(imgBack, offsetH);
            imgBack.Stretch = Stretch.Fill;




            SrcMImg = Accmululatable(new Img(ofd.FileName), "START", PLImagingWriter);

            imgBack.Source = ToBitmapSource(SrcMImg.GetLastValue());
            txbLog.Selection.Text = SrcMImg.GetLastPaper().Paper2TextHistory();

            Canvas.SetLeft(imgBack, offsetW);
            Canvas.SetTop(imgBack, offsetH);

        }
    }

    private void imgBack_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
    {
        FirstPos = e.GetPosition(this);
        imgBack.CaptureMouse();
    }

    private void imgBack_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
    {
        imgBack.ReleaseMouseCapture();
    }

    private void imgBack_MouseMove(object sender, System.Windows.Input.MouseEventArgs e)
    {
        if (e.LeftButton == MouseButtonState.Pressed)
        {
            Point temp = e.GetPosition(this);
            Point res = new Point(FirstPos.X - temp.X, FirstPos.Y - temp.Y);
            Canvas.SetLeft(imgBack, Canvas.GetLeft(imgBack) - res.X);
            Canvas.SetTop(imgBack, Canvas.GetTop(imgBack) - res.Y);
            FirstPos = temp;
        }
    }

    private void RegistMovement(Image img)
    {
        img.MouseLeftButtonDown += (ss, ee) =>
        {
            FirstPos = ee.GetPosition(this);
            imgBack.CaptureMouse();
        };

        img.MouseMove += (ss, ee) =>
        {
            if (ee.LeftButton == MouseButtonState.Pressed)
            {
                Point temp = ee.GetPosition(this);
                Point res = new Point(FirstPos.X - temp.X, FirstPos.Y - temp.Y);
                Canvas.SetLeft(imgBack, Canvas.GetLeft(imgBack) - res.X);
                Canvas.SetTop(imgBack, Canvas.GetTop(imgBack) - res.Y);
                FirstPos = temp;
            }
        };

        img.MouseUp += (ss, ee) => img.ReleaseMouseCapture();
    }


    private void Canvas_MouseWheel(object sender, MouseWheelEventArgs e)
    {
        Zoom += ZoomSpeed * e.Delta;

        if (Zoom < ZoomMin)
        {
            Zoom = ZoomMin;
        }

        if (Zoom > ZoomMax)
        {
            Zoom = ZoomMax;
        }

        Point mousePos = e.GetPosition(imgBack);

        if (Zoom > 1)
        {
            imgBack.RenderTransform = new ScaleTransform(Zoom, Zoom, mousePos.X, mousePos.Y);
        }
        else
        {
            imgBack.RenderTransform = new ScaleTransform(Zoom, Zoom);
        }
    }

    #endregion

}