Click here to Skip to main content
15,889,767 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: base wizard Pin
Jammer25-Mar-10 0:45
Jammer25-Mar-10 0:45 
GeneralRe: base wizard Pin
sth_Weird25-Mar-10 0:54
sth_Weird25-Mar-10 0:54 
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 
I wish to bind 'Canvas.Left' of an ellipse to a property (iEllipse) of Class instance(bClass). This property gets updated from several locations. Following is the C# code:

namespace BindingTest
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public class BindingClass
    {
        public int iEllipseLeft { get; set; }
        public BindingClass()
        {
            iEllipseLeft = 30;
        }
    }

    public partial class Window1 : Window
    {

        //Declare at top, so we could use it from anywhere       
        BindingClass bClass;
            
        public Window1()
        {
            InitializeComponent();
            bClass = new BindingClass();
        }

        // Update property of class
        private void updateLoc()
        {
            Random random = new Random();
            bClass.iEllipseLeft = random.Next(0, 100);
        }
    }
}


And, this is the ellipse I want to bind. Basically I want to move this ellipse whenever bClass.iEllipseLeft gets changed.

<Canvas Margin="16,128,244,52" Background="#FFE8E8E8">
	<Ellipse Fill="#FFFE0C0C" Width="32" Height="32" Canvas.Left= "5" Canvas.Top="48"/>
</Canvas>


Whether it is possible by writing '{Binding=..}' in .XAML or by coding in .cs file, please let me know. I'll be happy in either way. It might be a very simple question, but I've just started using WPF and C#, so please help Smile | :)
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 
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 

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.