Windows Vista Forums
Vista Forums Home Join Vista Forums Webcasts Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

Presenting rich content in a control template

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 01-10-2006   #1 (permalink)
Griff
Guest


 

Presenting rich content in a control template

I have a ControlTemplate for buttons.
In this I can completely specify the appearance of a button.
I can use some of the button's original parameters using (for example)
{TemplateBinding property=xxxx}

I would like to display the original content of the button too (whatever it
might be).

I tried
<ContentPresenter Content="{TemplateBinding
Property=ContentControl.Content}"/>
but that seems not to work.

How should I be doing this ?

Thanks in advance

--
Griff
(trying to make an industrial UI with XAML/WPF/c#)

My System SpecsSystem Spec
Old 01-10-2006   #2 (permalink)
viliescu
Guest


 

RE: Presenting rich content in a control template

The code you have posted should work. Can you post the entire button template?
--
Valentin Iliescu [MVP C#]


"Griff" wrote:

> I have a ControlTemplate for buttons.
> In this I can completely specify the appearance of a button.
> I can use some of the button's original parameters using (for example)
> {TemplateBinding property=xxxx}
>
> I would like to display the original content of the button too (whatever it
> might be).
>
> I tried
> <ContentPresenter Content="{TemplateBinding
> Property=ContentControl.Content}"/>
> but that seems not to work.
>
> How should I be doing this ?
>
> Thanks in advance
>
> --
> Griff
> (trying to make an industrial UI with XAML/WPF/c#)

My System SpecsSystem Spec
Old 01-31-2006   #3 (permalink)
Griff
Guest


 

RE: Presenting rich content in a control template

Sorry for delay in responding.
In fact this subsequently did work, I'm not sure what I changed.
Thanks.


"viliescu" wrote:

> The code you have posted should work. Can you post the entire button template?


My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
TFS 2008 Process Template: Default value tag for work item fieldsdoes not allow more than 255 characters to be entered into an HTML control Steve .NET General 0 07-23-2008 11:13 AM
Parental Control - Block By content Vipin [MVP] Vista security 0 07-20-2006 06:19 AM
Supplying named content as a parameter to control template. Griff Avalon 1 01-31-2006 06:59 AM
Control Template question Griff Avalon 3 01-10-2006 03:54 PM
VS/WPF crash on trying to add a WinFX Custom Control template to Jason Dolinger Avalon 5 01-10-2006 03:52 PM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51