Click here to Skip to main content
15,444,523 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Inheritence in XAML Pin
0x3c010-Apr-09 9:24
Member0x3c010-Apr-09 9:24 
QuestionStyles - Where Do I Put them? Pin
#realJSOP10-Apr-09 8:57
mva#realJSOP10-Apr-09 8:57 
AnswerRe: Styles - Where Do I Put them? Pin
R2B210-Apr-09 9:15
MemberR2B210-Apr-09 9:15 
GeneralRe: Styles - Where Do I Put them? Pin
#realJSOP10-Apr-09 10:21
mva#realJSOP10-Apr-09 10:21 
GeneralRe: Styles - Where Do I Put them? Pin
R2B210-Apr-09 10:59
MemberR2B210-Apr-09 10:59 
AnswerRe: Styles - Where Do I Put them? Pin
Mark Salsbery10-Apr-09 9:31
MemberMark Salsbery10-Apr-09 9:31 
GeneralRe: Styles - Where Do I Put them? Pin
#realJSOP10-Apr-09 10:22
mva#realJSOP10-Apr-09 10:22 
AnswerRe: Styles - Where Do I Put them? Pin
Wes Aday10-Apr-09 19:42
professionalWes Aday10-Apr-09 19:42 
John Simmons / outlaw programmer wrote:
global to the application


If I have a style or template that I want to be global I use a MergedDictionary, for example.
<Application.Resources>
       <ResourceDictionary>
           <ResourceDictionary.MergedDictionaries>
               <ResourceDictionary Source="Dictionaries\Styles.xaml" />
           </ResourceDictionary.MergedDictionaries>
       </ResourceDictionary>
   </Application.Resources>


John Simmons / outlaw programmer wrote:
how do I get to it once it's there


You would access the style/template using the key you define for it.
Resource dictionary:
 <ControlTemplate x:Key="NormalButtonTemplate" TargetType="{x:Type Button}">
snip...
 </ControlTemplate>


Then in your xaml you would assign it using the key in this case:
<Button Template="{DynamicResource NormalButtonTemplate}" />


Hope that helps

Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns

Help humanity, join the CodeProject grid computing team here

AnswerRe: Styles - Where Do I Put them? Pin
ctnightmare13-Apr-09 9:56
Memberctnightmare13-Apr-09 9:56 
AnswerRe: Styles - Where Do I Put them? Pin
Jammer14-Apr-09 8:09
MemberJammer14-Apr-09 8:09 
QuestionWPF Expander Control - Custom Header Pin
#realJSOP10-Apr-09 3:16
mva#realJSOP10-Apr-09 3:16 
AnswerRe: WPF Expander Control - Custom Header Pin
mikla52110-Apr-09 3:28
Membermikla52110-Apr-09 3:28 
AnswerRe: WPF Expander Control - Custom Header Pin
Insincere Dave10-Apr-09 3:28
MemberInsincere Dave10-Apr-09 3:28 
AnswerRe: WPF Expander Control - Custom Header Pin
Eslam Afifi10-Apr-09 3:35
MemberEslam Afifi10-Apr-09 3:35 
QuestionCreate a System::Windows::Controls::UserControl^ Pin
Member 377636710-Apr-09 2:25
MemberMember 377636710-Apr-09 2:25 
AnswerRe: Create a System::Windows::Controls::UserControl^ Pin
Mark Salsbery10-Apr-09 7:05
MemberMark Salsbery10-Apr-09 7:05 
QuestionWPF Datagrid: change image source on row clicked Pin
johnsontroye9-Apr-09 2:31
Memberjohnsontroye9-Apr-09 2:31 
QuestionWPF DataGrid Column CellStyle at Runtime Pin
zaki19848-Apr-09 23:53
Memberzaki19848-Apr-09 23:53 
AnswerRe: WPF DataGrid Column CellStyle at Runtime Pin
yogeshCJ2-Jun-10 23:44
MemberyogeshCJ2-Jun-10 23:44 
Questionwhere is the best start line Pin
cppwxwidgetsss8-Apr-09 19:44
Membercppwxwidgetsss8-Apr-09 19:44 
AnswerRe: where is the best start line Pin
Feras Mazen Taleb8-Apr-09 20:27
MemberFeras Mazen Taleb8-Apr-09 20:27 
AnswerRe: where is the best start line Pin
Mark Salsbery9-Apr-09 6:38
MemberMark Salsbery9-Apr-09 6:38 
QuestionAdd 'Command' property to derived control? Pin
David Veeneman8-Apr-09 9:04
MemberDavid Veeneman8-Apr-09 9:04 
AnswerRe: Add 'Command' property to derived control? Pin
David Veeneman8-Apr-09 14:06
MemberDavid Veeneman8-Apr-09 14:06 
QuestionWPF textbox, update problem. Mode: TwoWay Pin
marca2927-Apr-09 23:42
Membermarca2927-Apr-09 23:42 

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.