Skip to content

Instantly share code, notes, and snippets.

@treytomes
Created February 22, 2016 14:39
Show Gist options
  • Save treytomes/4de5ff5563d9e670e54f to your computer and use it in GitHub Desktop.
Save treytomes/4de5ff5563d9e670e54f to your computer and use it in GitHub Desktop.
Using Path elements to create paging controls.
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Button Command="{Binding GotoFirstPageCommand}" Margin="4" Padding="2" ToolTip="Go to the first page.">
<Button.Content>
<Path HorizontalAlignment="Center" Stroke="Black" StrokeThickness="1" StrokeLineJoin="Round" Fill="Green" Data="M 0,0 L 2,0 2,8 0,8 Z M 2,4 L 8,8 8,0 Z" />
</Button.Content>
</Button>
<Button Command="{Binding GotoPreviousPageCommand}" Margin="4" Padding="2" ToolTip="Go to the previous page.">
<Button.Content>
<Path HorizontalAlignment="Center" Stroke="Black" StrokeThickness="1" StrokeLineJoin="Round" Fill="Green" Data="M 0,4 L 8,8 8,0 Z" />
</Button.Content>
</Button>
<Button Command="{Binding GotoNextPageCommand}" Margin="4" Padding="2" ToolTip="Go to the next page.">
<Button.Content>
<Path HorizontalAlignment="Center" Stroke="Black" StrokeThickness="1" StrokeLineJoin="Round" Fill="Green" Data="M 8,4 L 0,8 0,0 Z" />
</Button.Content>
</Button>
<Button Command="{Binding GotoLastPageCommand}" Margin="4" Padding="2" ToolTip="Go to the last page.">
<Button.Content>
<Path HorizontalAlignment="Center" Stroke="Black" StrokeThickness="1" StrokeLineJoin="Round" Fill="Green" Data="M 6,4 L 0,8 0,0 Z M 6,0 L 6,8 8,8 8,0 Z" />
</Button.Content>
</Button>
</StackPanel>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment