pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill van Melle <bill.van.me...@gmail.com>
Subject Re: How to get a wrapped TextInput?
Date Thu, 03 Mar 2011 21:20:29 GMT
Thanks for the long and thoughtful reply, Chris.

I have no experience with WPF & XAML, so this might be a stupid question,
> but does it easily allow end users to make modifications to component
> behaviour?  If so, perhaps that is something that Pivot can learn from.
>

Appearance, yes.  There is a notion of a control template, which you can
replace (in xaml, typically) to entirely change how a control looks without
effecting its essential nature.  E.g., you can change how a Button looks
when the user hovers over it or presses it, while leaving it be a Button in
all other regards.  It's an extremely powerful facility, with an equally
steep learning curve.  So I wouldn't use the word "easily".


> You mentioned that TextBox has 'AcceptsReturn' & 'TextWrapping' attributes,
> but what if it didn't?  What would be the process for adding them yourself
> if you had to?
>

I would subclass TextBox.  To implement AcceptsReturn, I'd declare what they
call a "Dependency Property" (maybe something like a Pivot notifying
property?) and then override OnKeyDown to intercept Enter and prevent the
base class from handling it.  Or something like that.  Hard to say for sure
without trying.  TextWrapping would be much harder.  There's a bunch of
methods to override relating to measuring and laying out and painting.


> If you find component functionality in WPF (or other GUI frameworks) that
> does not exist in Pivot, feel free to discuss it on the list, submit feature
> requests in JIRA or even provide patches to implement the behaviour.
>

Will do, and have done -- you may notice I regularly refer to WPF
equivalents in some of my messages.

As for documentation, some sort of automated tool that extracted the bean
properties of Foo and FooSkin and presented them in a simple format would be
much nicer than trying to find my way thru the current JavaDoc.

Mime
View raw message