Click here to Skip to main content
15,891,567 members

Comments by ajit_machhe (Top 24 by date)

ajit_machhe 4-May-12 14:37pm View    
Dear Shahin,
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace listtester
{
///
/// Interaction logic for MainWindow.xaml
///

///

public class ThumbPosition : Thumb
{

public double X { get; set; }
public double Y { get; set; }

////public double Width { get; set; }
////public double Height { get; set; }

//private List<ThumbPosition> MyList = new List<ThumbPosition>();

public ThumbPosition(double X, double Y)
{
//this.X = x;
//this.Y = y;
//this.Width = width;
//this.Height = height;
DragDelta += new DragDeltaEventHandler(this.MoveThumb_DragDelta);
}

public void MoveThumb_DragDelta(object sender, DragDeltaEventArgs e)
{
Thumb thumb = sender as Thumb;
//Canvas.SetLeft(thumb, Canvas.GetLeft(thumb) + e.HorizontalChange);
//Canvas.SetTop(thumb, Canvas.GetTop(thumb) + e.VerticalChange);

Canvas.SetLeft(thumb, e.HorizontalChange);
// Canvas.SetTop(thumb, 10 + e.VerticalChange);
}


}

public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}

private void button1_Click(object sender, RoutedEventArgs e)
{
ThumbPosition th = new ThumbPosition(10,20);
th.Width = 140;
th.Height = 40;
//Canvas.SetLeft(th, 10);
//Canvas.SetTop(th, 20);
th.Background = System.Windows.Media.Brushes.Orange;
canv.Children.Add(th);
}
}
}


i tried this but not working if you could help me more ?
ajit_machhe 10-Apr-12 14:26pm View    
Thanks a lot for you patience...

i will check it tomorrow because I have to wake up early in morning.

am sorry for trouble i created.

i will try to do my best but if i fail.(i will try not to.) i hope i can ask for help again here...

thanks a lot dear...
ajit_machhe 10-Apr-12 14:11pm View    
appreciate* (miss spell)
ajit_machhe 10-Apr-12 14:10pm View    
Dear Shahin,

i appricate your help but i didn't understand mylist.where and mylist.add

i guess i am making you upset by asking question again and again..

if i do... I am really very sorry. i didn't mean to bother but I am learning.
ajit_machhe 10-Apr-12 14:06pm View    
how do i add new instance of class to a collection ??

i didn't understand this part..