You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
3.7 KiB
69 lines
3.7 KiB
<!--*********************************************************************
|
|
|
|
Extended WPF Toolkit
|
|
|
|
Copyright (C) 2010-2012 Xceed Software Inc.
|
|
|
|
This program is provided to you under the terms of the Microsoft Reciprocal
|
|
License (Ms-RL) as published at http://wpftoolkit.codeplex.com/license
|
|
|
|
This program can be provided to you by Xceed Software Inc. under a
|
|
proprietary commercial license agreement for use in non-Open Source
|
|
projects. The commercial version of Extended WPF Toolkit also includes
|
|
priority technical support, commercial updates, and many additional
|
|
useful WPF controls if you license Xceed Business Suite for WPF.
|
|
|
|
Visit http://xceed.com and follow @datagrid on Twitter.
|
|
|
|
********************************************************************-->
|
|
<sample:DemoView x:Class="Samples.Modules.Button.Views.ButtonSpinnerView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:sample="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure"
|
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
|
Title="ButtonSpinner">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Text="The ButtonSpinner control allows you to add button spinners to any element and then respond to the Spin event to manipulate that element. The Spin event lets the developer know which direction the buttons are spinning; SpinDirection.Increase indicates an increment, SpinDirection.Decrease indicates a decrement."
|
|
TextWrapping="Wrap" />
|
|
|
|
<GroupBox Header="Features" Grid.Row="1" Margin="5">
|
|
<Grid Margin="5">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock Text="AllowSpin:" VerticalAlignment="Center" />
|
|
<CheckBox x:Name="_allowSpin" Grid.Column="1" IsChecked="True" VerticalAlignment="Center" Margin="5" ToolTip="When true allows the ButtonSpinner to perform increment/decrement operations." />
|
|
|
|
<TextBlock Text="ShowButtonSpinner:" VerticalAlignment="Center" Grid.Row="1" />
|
|
<CheckBox x:Name="_showButtonSpinner" Grid.Row="1" Grid.Column="1" IsChecked="True" VerticalAlignment="Center" Margin="5" ToolTip="Gets/Sets the visibility of the button spinners." />
|
|
</Grid>
|
|
</GroupBox>
|
|
|
|
<StackPanel Grid.Row="2" Margin="10">
|
|
<TextBlock Text="Usage:" Style="{StaticResource Header}" />
|
|
<TextBlock Text="You can wrap any element by placing it inside the content area of the ButtonSpinner control. As an example, lets create our own simple numeric up/down control"
|
|
TextWrapping="Wrap" />
|
|
|
|
<xctk:ButtonSpinner Margin="10"
|
|
Width="150"
|
|
HorizontalAlignment="Left"
|
|
AllowSpin="{Binding IsChecked, ElementName=_allowSpin}"
|
|
ShowButtonSpinner="{Binding IsChecked, ElementName=_showButtonSpinner}"
|
|
Spin="ButtonSpinner_Spin">
|
|
<TextBox Text="0" BorderThickness="0" HorizontalContentAlignment="Right" />
|
|
</xctk:ButtonSpinner>
|
|
</StackPanel>
|
|
</Grid>
|
|
</sample:DemoView>
|
|
|