954,518 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

WPF C# .text not working

Ok I am try to make a simple calculator, and it looks like every thing if working find, but my btn.Text isn't is giving me the Error

'System.Windows.Controls.Button' does not contain a definition for 'Text' and no extension method 'Text' accepting a first argument of type 'System.Windows.Controls.Button' could be found (are you missing a using directive or an assembly reference?)

I am not sure what I am supposed to do here.

TBoxMain.Text+= btn.Text;
I am currently using

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
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;
using System.Collections;
using System.ComponentModel;

please help,
thanks

Blizard6
Newbie Poster
4 posts since Jun 2009
Reputation Points: 10
Solved Threads: 0
 

NM,

I realized I am a Idiot/noob and WPF doesn't use .text it uses .Content.

lol It is so much fun learning a new language. *cry*

Blizard6
Newbie Poster
4 posts since Jun 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You