Click here to Skip to main content
15,895,667 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Conditional DataBinding to UI Elements Pin
Andy_L_J5-Feb-12 15:43
Andy_L_J5-Feb-12 15:43 
QuestionOwn TreeViewItem with image and text Pin
Mc_Topaz2-Feb-12 22:20
Mc_Topaz2-Feb-12 22:20 
AnswerRe: Own TreeViewItem with image and text Pin
Mc_Topaz3-Feb-12 0:52
Mc_Topaz3-Feb-12 0:52 
GeneralGridSplitter Conundrum Pin
Gil Yoder1-Feb-12 15:31
Gil Yoder1-Feb-12 15:31 
QuestionRe: GridSplitter Conundrum Pin
Gil Yoder2-Feb-12 9:44
Gil Yoder2-Feb-12 9:44 
AnswerRe: GridSplitter Conundrum Pin
SledgeHammer012-Feb-12 11:40
SledgeHammer012-Feb-12 11:40 
GeneralRe: GridSplitter Conundrum Pin
Gil Yoder2-Feb-12 14:09
Gil Yoder2-Feb-12 14:09 
GeneralRe: GridSplitter Conundrum Pin
SledgeHammer012-Feb-12 14:37
SledgeHammer012-Feb-12 14:37 
Gil Yoder wrote:
Using binding I ran a test with GridSplitterEx to watch the size of
the right column as the splitter moved right. The column would shrink to a size
of about 210 pixels (close to MinWidth + 12) plus or minus a pixel
or two (it wasn't always the same), when the splitter would stop moving.


Oh yeah, I now have some vague recollection about the grid "randomly" growing if I went past a certain point (the + 12). I don't remember the exact details, but that sounds like the right neighborhood.

Gil Yoder wrote:
your code does workaround the problem for the simplified Window I
presented, giving the approximate minimum size for the column, but it did not
work unmodified, if I added another column between the splitter and the last
column in my XAML.


Correct. I only needed a left & right column, so GridSplitterEx only handles that case Smile | :) . Doing it generically for multiple columns on the right seemed like a lot of unnecessary work at the time Smile | :) .

It *is* a bug in .NET & GridSplitter though.

Unfortunately, it is not easy to fix. If you look at the source code for GridSplitter, everything you need access to (to do this right) is private. No virtual methods, etc. to override.

I think if you want to do a generic multi-column fix, you need to do the work in a GridEx : Grid type class and override MeasureOverride & ArrangeOverride and fix the bug there.

Basically copy the source for those two functions and debug to see where the bug is... but really, what is the expected behavior?

Lets say you have something like:

1 (min 200) | 2 (min 200) | 3 (min 200)

No matter how you fix it, it is always going to be possible to run 2 & 3 off the screen. For example... maximize the window, move splitter 1 all the way to the right. Then minimize. 2 and 3 will be gone.

There are a whole bunch of cases you need to handle Smile | :) .

Even my fix will not handle that case for just one splitter. Resizing the window horizontally will not resize the panes.
GeneralRe: GridSplitter Conundrum Pin
Gil Yoder2-Feb-12 15:43
Gil Yoder2-Feb-12 15:43 
SuggestionRe: GridSplitter Conundrum Pin
Gil Yoder2-Feb-12 18:59
Gil Yoder2-Feb-12 18:59 
GeneralRe: GridSplitter Conundrum Pin
SledgeHammer013-Feb-12 7:17
SledgeHammer013-Feb-12 7:17 
Questionadding/removing ListView columns at runtime (revisited) Pin
Vincent Beek1-Feb-12 0:20
Vincent Beek1-Feb-12 0:20 
AnswerRe: adding/removing ListView columns at runtime (revisited) Pin
Abhinav S1-Feb-12 0:36
Abhinav S1-Feb-12 0:36 
GeneralRe: adding/removing ListView columns at runtime (revisited) Pin
Mycroft Holmes1-Feb-12 11:53
professionalMycroft Holmes1-Feb-12 11:53 
QuestionBinding list of items to IntemsControl in WPF Pin
rams230-Jan-12 23:14
rams230-Jan-12 23:14 
AnswerRe: Binding list of items to IntemsControl in WPF Pin
Wayne Gaylard31-Jan-12 0:10
professionalWayne Gaylard31-Jan-12 0:10 
GeneralRe: Binding list of items to IntemsControl in WPF Pin
rams231-Jan-12 0:36
rams231-Jan-12 0:36 
GeneralRe: Binding list of items to IntemsControl in WPF Pin
Wayne Gaylard31-Jan-12 0:39
professionalWayne Gaylard31-Jan-12 0:39 
GeneralRe: Binding list of items to IntemsControl in WPF Pin
Abhinav S1-Feb-12 16:26
Abhinav S1-Feb-12 16:26 
GeneralRe: Binding list of items to IntemsControl in WPF Pin
Wayne Gaylard1-Feb-12 19:06
professionalWayne Gaylard1-Feb-12 19:06 
QuestionFocusing on elements in MVVM Pin
mi_n30-Jan-12 22:42
mi_n30-Jan-12 22:42 
AnswerRe: Focusing on elements in MVVM PinPopular
Pete O'Hanlon30-Jan-12 23:03
mvePete O'Hanlon30-Jan-12 23:03 
GeneralRe: Focusing on elements in MVVM Pin
Pete O'Hanlon31-Jan-12 3:34
mvePete O'Hanlon31-Jan-12 3:34 
GeneralRe: Focusing on elements in MVVM Pin
Wayne Gaylard31-Jan-12 3:39
professionalWayne Gaylard31-Jan-12 3:39 
GeneralRe: Focusing on elements in MVVM Pin
Pete O'Hanlon31-Jan-12 3:47
mvePete O'Hanlon31-Jan-12 3:47 

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.