Click here to Skip to main content
15,884,697 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: WPF(Show data of type Varbinary in form of image in GridViewColumn) Pin
drcmomo5-May-09 10:19
drcmomo5-May-09 10:19 
QuestionHow to access silverlight control properties from aspx page Pin
wantToCode5-May-09 1:46
wantToCode5-May-09 1:46 
AnswerRe: How to access silverlight control properties from aspx page Pin
Ray Cassick5-May-09 2:29
Ray Cassick5-May-09 2:29 
QuestionRe: How to access silverlight control properties from aspx page Pin
wantToCode12-May-09 19:42
wantToCode12-May-09 19:42 
AnswerRe: How to access silverlight control properties from aspx page Pin
Ray Cassick13-May-09 2:25
Ray Cassick13-May-09 2:25 
QuestionHow to convert a handle to a wpf window? Pin
Eric Vonjacson5-May-09 0:55
Eric Vonjacson5-May-09 0:55 
AnswerRe: How to convert a handle to a wpf window? Pin
Mark Salsbery5-May-09 5:29
Mark Salsbery5-May-09 5:29 
QuestionWPF RichTextBox - Appending Colored text Pin
Harvey Saayman4-May-09 22:08
Harvey Saayman4-May-09 22:08 
Hey guys

I need to append text to a WPF RichTextBox, but specific colors.

After much googling i put together the following method

private void AppendRtfText(string Text, Brush Color)
{
    TextRange range = new TextRange(txtChat.Document.ContentEnd, txtChat.Document.ContentEnd);
    range.Text = Text;
    range.ApplyPropertyValue(TextElement.ForegroundProperty, Color);
}


Now this works just fine, but I need to be able to specify RGB values.

The TextElement.ForegroundProperty only accepts a Brush and as far as I can see I cant specify RGB for a brush like i would with the Color class.

Any ideas? Cause I'm running out

Harvey Saayman - South Africa
Software Developer
.Net, C#, SQL

you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111

AnswerRe: WPF RichTextBox - Appending Colored text Pin
Philipp Sumi4-May-09 22:13
Philipp Sumi4-May-09 22:13 
GeneralRe: WPF RichTextBox - Appending Colored text Pin
Harvey Saayman4-May-09 23:14
Harvey Saayman4-May-09 23:14 
QuestionWPF(add a message or text in the xmal elements like ellipse at run time in windows application. [modified] Pin
Ch.Gayatri Subudhi4-May-09 18:34
Ch.Gayatri Subudhi4-May-09 18:34 
AnswerRe: WPF(add a message or text in the xmal elements like ellipse at run time in windows application. Pin
Philipp Sumi4-May-09 20:35
Philipp Sumi4-May-09 20:35 
GeneralRe: WPF(add a message or text in the xmal elements like ellipse at run time in windows application. Pin
Ch.Gayatri Subudhi4-May-09 21:20
Ch.Gayatri Subudhi4-May-09 21:20 
GeneralRe: WPF(add a message or text in the xmal elements like ellipse at run time in windows application. Pin
Philipp Sumi4-May-09 21:22
Philipp Sumi4-May-09 21:22 
GeneralRe: WPF(add a message or text in the xmal elements like ellipse at run time in windows application. Pin
Ch.Gayatri Subudhi4-May-09 21:33
Ch.Gayatri Subudhi4-May-09 21:33 
GeneralRe: WPF(add a message or text in the xmal elements like ellipse at run time in windows application. Pin
Philipp Sumi4-May-09 21:38
Philipp Sumi4-May-09 21:38 
GeneralRe: WPF(add a message or text in the xmal elements like ellipse at run time in windows application. Pin
Ch.Gayatri Subudhi4-May-09 21:42
Ch.Gayatri Subudhi4-May-09 21:42 
GeneralRe: WPF(add a message or text in the xmal elements like ellipse at run time in windows application. Pin
Philipp Sumi4-May-09 21:46
Philipp Sumi4-May-09 21:46 
GeneralRe: WPF(add a message or text in the xmal elements like ellipse at run time in windows application. Pin
Ch.Gayatri Subudhi4-May-09 21:51
Ch.Gayatri Subudhi4-May-09 21:51 
GeneralRe: WPF(add a message or text in the xmal elements like ellipse at run time in windows application. Pin
Ch.Gayatri Subudhi4-May-09 21:53
Ch.Gayatri Subudhi4-May-09 21:53 
GeneralRe: WPF(add a message or text in the xmal elements like ellipse at run time in windows application. Pin
Ch.Gayatri Subudhi4-May-09 22:02
Ch.Gayatri Subudhi4-May-09 22:02 
GeneralSir i got anothr solution regarding this... Pin
Ch.Gayatri Subudhi5-May-09 20:25
Ch.Gayatri Subudhi5-May-09 20:25 
GeneralRe: WPF(add a message or text in the xmal elements like ellipse at run time in windows application. Pin
Ch.Gayatri Subudhi5-May-09 1:13
Ch.Gayatri Subudhi5-May-09 1:13 
QuestionUserControl Databinding Pin
mikla5213-May-09 3:14
mikla5213-May-09 3:14 
AnswerRe: UserControl Databinding Pin
Mark Salsbery3-May-09 8:31
Mark Salsbery3-May-09 8:31 

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.