brianlagunas_cp
|
308ad9dc85
|
initial checkin of new ButtonSpinner control. Allows you to add button spinners to any element and then respond to the Spin event to manipulate that element. To add use the following syntax
<toolkit:ButtonSpinner Spin="ButtonSpinner_Spin" >
<TextBox x:Name="_txtValue" />
</toolkit:ButtonSpinner>
private void ButtonSpinner_Spin(object sender, Microsoft.Windows.Controls.Primitives.SpinEventArgs e)
{
int value = String.IsNullOrEmpty(_txtValue.Text) ? 0 : Convert.ToInt32(_txtValue.Text);
if (e.Direction == Microsoft.Windows.Controls.Primitives.SpinDirection.Increase)
value++;
else
value--;
_txtValue.Text = value.ToString();
}
|
15 years ago |