PDA

View Full Version : Behavior development help needed



ETOSoft
August 21st, 2009, 07:31 AM
Hi forum members,

after reading the illuminating posts regarding Behaviors I've decided to add a new one to my first WPF Application developed in Blend(visualbasic).

If I declare the "Time" parameter like following, the interface shows me a field where I can input every kind of value, negative positive without any limit (example, the blend par of other behaviors has a range 1-100).

Public Property Time() As Double
Get
Return _time.TotalSeconds
End Get
Set(ByVal value As double)
_time = TimeSpan.FromSeconds(value)
End Set
End Property

Could you suggest me the way to add a parameter that accepts only a range of values (for exemple from 1 to 100)?

kirupa
August 25th, 2009, 01:36 AM
Sorry for the delay in replying to this. I'm looking into this right now, and hopefully I'll have an answer by tomorrow :)

kirupa
August 26th, 2009, 04:33 PM
I think I found it. For the property you are wishing to limit the range of values to, set the NumberRangesAttribute defined in Microsoft.Windows.Design.Interaction DLL.

Cheers!
Kirupa :)