Click here to Skip to main content
15,897,187 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: base wizard Pin
keyur soni25-Mar-10 1:08
keyur soni25-Mar-10 1:08 
QuestionUsing wcf services in Silverlight that is running in console application Pin
Sanjay_bmsit24-Mar-10 2:23
Sanjay_bmsit24-Mar-10 2:23 
AnswerRe: Using wcf services in Silverlight that is running in console application Pin
Michael J. Eber16-Apr-10 20:30
Michael J. Eber16-Apr-10 20:30 
QuestionSilverlight and WCf services Pin
sanjay_honeywell24-Mar-10 0:16
sanjay_honeywell24-Mar-10 0:16 
AnswerRe: Silverlight and WCf services Pin
Abhinav S24-Mar-10 3:35
Abhinav S24-Mar-10 3:35 
QuestionBinding WPF element to property of a class Pin
Prasoon Chaudhary23-Mar-10 20:33
Prasoon Chaudhary23-Mar-10 20:33 
AnswerRe: Binding WPF element to property of a class Pin
koleraba23-Mar-10 22:22
koleraba23-Mar-10 22:22 
AnswerRe: Binding WPF element to property of a class Pin
Prasoon Chaudhary24-Mar-10 23:40
Prasoon Chaudhary24-Mar-10 23:40 
Got the answer. Thanks koleraba! Just adding few bits and adjustments to your code to make it run.

Inside class, we need to define property something like this:

public class BindingClass : DependencyObject
   {
       public static DependencyProperty EllipseLeftProperty = DependencyProperty.Register("iEllipseLeft", typeof(int), typeof(BindingClass));
       public int iEllipseLeft
       {
           get { return (int)GetValue(EllipseLeftProperty); }
           set { SetValue(EllipseLeftProperty, value); }
       }
   }

Also in starting, we need to set data context of the object/canvas or Window:
BindingClass bClass = new BindingClass();
objEllipse.DataContext = bClass; 

And, in .xaml file:

in stead of
<Ellipse Fill="#FFFE0C0C" Width="32" Height="32" Canvas.Left= "5" Canvas.Top="48"/> 

write
<Ellipse Fill="#FFFE0C0C" Width="32" Height="32" Canvas.Left= "{Binding Path=iEllipseLeft}" Canvas.Top="48"/>

That completes the binding!! Smile | :)
QuestionCarousel website.. Beginner Pin
Yraith23-Mar-10 7:45
Yraith23-Mar-10 7:45 
AnswerRe: Carousel website.. Beginner Pin
Kunal Chowdhury «IN»23-Mar-10 16:57
professionalKunal Chowdhury «IN»23-Mar-10 16:57 
AnswerRe: Carousel website.. Beginner Pin
Abhinav S23-Mar-10 18:54
Abhinav S23-Mar-10 18:54 
GeneralRe: Carousel website.. Beginner Pin
Yraith24-Mar-10 5:02
Yraith24-Mar-10 5:02 
QuestionAdding additional Brushes to the Style of a ContentControl Pin
Alan Beasley22-Mar-10 3:06
Alan Beasley22-Mar-10 3:06 
AnswerRe: Adding additional Brushes to the Style of a ContentControl Pin
Abhinav S22-Mar-10 4:18
Abhinav S22-Mar-10 4:18 
GeneralRe: Adding additional Brushes to the Style of a ContentControl [modified] Pin
Alan Beasley22-Mar-10 5:25
Alan Beasley22-Mar-10 5:25 
GeneralRe: Adding additional Brushes to the Style of a ContentControl Pin
Abhinav S22-Mar-10 7:38
Abhinav S22-Mar-10 7:38 
GeneralRe: Adding additional Brushes to the Style of a ContentControl Pin
Alan Beasley22-Mar-10 8:06
Alan Beasley22-Mar-10 8:06 
GeneralRe: Adding additional Brushes to the Style of a ContentControl Pin
Katka Vaughan20-Apr-10 10:15
Katka Vaughan20-Apr-10 10:15 
GeneralRe: Adding additional Brushes to the Style of a ContentControl Pin
Alan Beasley20-Apr-10 22:34
Alan Beasley20-Apr-10 22:34 
GeneralRe: Adding additional Brushes to the Style of a ContentControl Pin
Katka Vaughan21-Apr-10 1:15
Katka Vaughan21-Apr-10 1:15 
GeneralRe: Adding additional Brushes to the Style of a ContentControl Pin
Alan Beasley21-Apr-10 1:29
Alan Beasley21-Apr-10 1:29 
QuestionObject reference not set to an instance of an object Pin
FEMDEV22-Mar-10 2:25
FEMDEV22-Mar-10 2:25 
AnswerRe: Object reference not set to an instance of an object Pin
Pete O'Hanlon22-Mar-10 2:32
mvePete O'Hanlon22-Mar-10 2:32 
GeneralRe: Object reference not set to an instance of an object Pin
FEMDEV22-Mar-10 3:30
FEMDEV22-Mar-10 3:30 
GeneralRe: Object reference not set to an instance of an object Pin
Kevin McFarlane22-Mar-10 7:02
Kevin McFarlane22-Mar-10 7:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.