Click here to Skip to main content
15,896,912 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: How i can add new buttons to my epander control Pin
wasimsharp4-Aug-09 1:27
wasimsharp4-Aug-09 1:27 
GeneralRe: How i can add new buttons to my epander control Pin
Super Lloyd4-Aug-09 1:40
Super Lloyd4-Aug-09 1:40 
AnswerRe: How i can add new buttons to my epander control Pin
wasimsharp4-Aug-09 1:56
wasimsharp4-Aug-09 1:56 
QuestionCustom classes in XAML - Assign properties after parents set Pin
Ian Shlasko3-Aug-09 4:15
Ian Shlasko3-Aug-09 4:15 
AnswerRe: Custom classes in XAML - Assign properties after parents set Pin
Super Lloyd4-Aug-09 3:14
Super Lloyd4-Aug-09 3:14 
GeneralRe: Custom classes in XAML - Assign properties after parents set Pin
Ian Shlasko4-Aug-09 12:14
Ian Shlasko4-Aug-09 12:14 
GeneralRe: Custom classes in XAML - Assign properties after parents set Pin
Super Lloyd4-Aug-09 13:06
Super Lloyd4-Aug-09 13:06 
GeneralRe: Custom classes in XAML - Assign properties after parents set Pin
Ian Shlasko4-Aug-09 15:57
Ian Shlasko4-Aug-09 15:57 
That would work, but it's geared more for a one-time load than real-time updates.  

Here's a better example of how it works:

<RegionElement Style="B=LR">
   <Cell>Some Text</Cell>
   <Cell Style="B=TB">Middle cell</Cell>
   <Cell>Other text</Cell>
</RegionElement>

I have my own codes set up for styles, so I can define them easily as strings, but as a quick summary, "B" stands for border, and it takes L,T,R,B for the sides (Among other things)...

So the idea here is that the RegionElement gets defined, and gets a style set, so it knows that it and everything inside it will by default have borders on the left and right sides.

Then the middle cell gets defined, and has a style for borders on the top and bottom.   Now, it can look up to its parent element (Only one level up in this case) and see that it should start with left and right... It combines the two, and puts a border on all four sides.

What REALLY happens is that the middle cell gets a style of "TB" (Top/bottom), but doesn't have a parent yet, because WPF set the properties before adding it to the RegionElement.   It has no parent, so just uses left/right, and never sees top/bottom.

My solution was to give the base class for GridElements an Initialize() method, so the style is first just stored as a string, and then when the model is put together, an Initialize() call runs down the tree and does the processing on that style.

It's not ideal, but going the INotifyPropertyChanged route adds more overhead than is warranted, as this was never intended to be updated in real-time.


(This framework is starting to come together really nicely... Wish I could release it on CP, but it's work-for-hire, so not mine to give away)

Proud to have finally moved to the A-Ark. Which one are you in?
Developer, Author (Guardians of Xen)

QuestionHow can I cache data in WPF application? Pin
Kunal Chowdhury «IN»3-Aug-09 1:06
professionalKunal Chowdhury «IN»3-Aug-09 1:06 
AnswerRe: How can I cache data in WPF application? Pin
Pete O'Hanlon3-Aug-09 1:32
mvePete O'Hanlon3-Aug-09 1:32 
AnswerRe: How can I cache data in WPF application? Pin
Kunal Chowdhury «IN»3-Aug-09 2:43
professionalKunal Chowdhury «IN»3-Aug-09 2:43 
QuestionHow to Give Header in multicolunm TreeView and also implement sorting algo? Pin
sachinjadhavcm2-Aug-09 23:54
sachinjadhavcm2-Aug-09 23:54 
QuestionAdjusting Panels in WPF programatically ? Pin
Krishna Aditya2-Aug-09 20:31
Krishna Aditya2-Aug-09 20:31 
AnswerRe: Adjusting Panels in WPF programatically ? Pin
Christian Graus2-Aug-09 22:02
protectorChristian Graus2-Aug-09 22:02 
QuestionGlobal Styles - Update Pin
#realJSOP2-Aug-09 1:02
professional#realJSOP2-Aug-09 1:02 
QuestionHow to display a document in silverlight? Pin
CBenac31-Jul-09 14:27
CBenac31-Jul-09 14:27 
AnswerRe: How to display a document in silverlight? Pin
Michael Sync31-Jul-09 18:21
Michael Sync31-Jul-09 18:21 
QuestionUse Themes? Pin
#realJSOP31-Jul-09 1:09
professional#realJSOP31-Jul-09 1:09 
AnswerRe: Use Themes? Pin
Super Lloyd31-Jul-09 1:52
Super Lloyd31-Jul-09 1:52 
AnswerRe: Use Themes? Pin
Pete O'Hanlon31-Jul-09 1:53
mvePete O'Hanlon31-Jul-09 1:53 
QuestionHow to add silverlight. Pin
Blikkies30-Jul-09 21:20
professionalBlikkies30-Jul-09 21:20 
AnswerRe: How to add silverlight. Pin
Mark Salsbery31-Jul-09 5:08
Mark Salsbery31-Jul-09 5:08 
GeneralRe: How to add silverlight. Pin
Blikkies2-Aug-09 8:17
professionalBlikkies2-Aug-09 8:17 
QuestionUse XAML file as vector image Pin
Jack Valmadre30-Jul-09 12:01
Jack Valmadre30-Jul-09 12:01 
AnswerRe: Use XAML file as vector image Pin
Christian Graus30-Jul-09 13:57
protectorChristian Graus30-Jul-09 13:57 

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.