Skip to content

Latest commit

 

History

History
195 lines (151 loc) · 8.03 KB

getting-started.md

File metadata and controls

195 lines (151 loc) · 8.03 KB
title page_title description slug tags published position
Getting Started
Getting Started
Check our "Getting Started" documentation article for the RadPipsPager control.
radpipspager-getting-started
getting started, radpipspager
true
2

Getting Started with {{ site.framework_name }} PipsPager

This tutorial will walk you through the creation of a sample application that contains a PipsPager control.

Adding Telerik Assemblies Using NuGet

To use RadPipsPager when working with NuGet packages, install the Telerik.Windows.Controls.for.Wpf.Xaml package. The [package name may vary]({%slug nuget-available-packages%}) slightly based on the Telerik dlls set - [Xaml or NoXaml]({%slug xaml-vs-noxaml%})

Read more about NuGet installation in the [Installing UI for WPF from NuGet Package]({%slug nuget-installation%}) article.

tip With the 2025 Q1 release, the Telerik UI for WPF has a new licensing mechanism. You can learn more about it [here]({%slug installing-license-key%}).

Adding Assembly References Manually

If you are not using NuGet packages, you can add a reference to the following assemblies:

  • Telerik.Licensing.Runtime
  • Telerik.Windows.Controls

Defining the RadPipsPager

You can add RadPipsPager manually in XAML as demonstrated in the following example:

[XAML] Adding RadPipsPager in XAML

{{region radpipspager-getting-started-0}} telerik:RadPipsPager/ {{endregion}}

Adding Items

The RadPipsPager control works with RadPipsPagerItem elements that are added to the Items collection of the control. These elements can be added both in XAML and in code.

[XAML] Adding RadPipsPagerItems

{{region radpipspager-getting-started-1}} telerik:RadPipsPager telerik:RadPipsPagerItem/ telerik:RadPipsPagerItem/ telerik:RadPipsPagerItem/ </telerik:RadPipsPager> {{endregion}}

RadPipsPager with manually added items

{{ site.framework_name }} RadPipsPager with manually added items

Data Binding

The RadPipsPager component allows you to navigate the items of any ItemsControl controls by binding to its collection.

The following example a basic scenario where the RadPipsPager is used together with another control.

[C#] Creating the model

{{region radpipspager-getting-started-2}} public class Person { public string Name { get; set; } } {{endregion}}

[VB.NET] Creating the model

{{region radpipspager-getting-started-3}} Public Class Person Public Property Name As String End Class {{endregion}}

[C#] Creating the view model

{{region radpipspager-getting-started-4}} public class MainViewModel { public MainViewModel() { this.People = new ObservableCollection { new Person() { Name = "Jack" }, new Person() { Name = "Mike" }, new Person() { Name = "Nick" } }; }

    public ObservableCollection<Person> People { get; set; }
}

{{endregion}}

[VB.NET] Creating the view model

{{region radpipspager-getting-started-5}} Public Class MainViewModel Public Sub New() Me.People = New ObservableCollection(Of Person) From { New Person() With { .Name = "Jack" }, New Person() With { .Name = "Mike" }, New Person() With { .Name = "Nick" } } End Sub

    Public Property People As ObservableCollection(Of Person)
End Class

{{endregion}}

[XAML] Creating the view

{{region radpipspager-getting-started-6}} <Grid.DataContext> local:MainViewModel/ </Grid.DataContext> <Grid.RowDefinitions> </Grid.RowDefinitions> <telerik:RadSlideView x:Name="slideView" ItemsSource="{Binding People}" SelectedIndex="0"> telerik:RadSlideView.ItemTemplate </telerik:RadSlideView.ItemTemplate> </telerik:RadSlideView> <telerik:RadPipsPager ItemsSource="{Binding ElementName=slideView, Path=ItemsSource}" SelectedItem="{Binding ElementName=slideView, Path=SelectedItem}" Grid.Row="1" ButtonVisibility="Visible"/> {{endregion}}

RadPipsPager and RadSlideView result

{{ site.framework_name }} RadPipsPager and RadSlideView result

Setting a Theme

The controls from our suite support different themes. You can see how to apply a theme different than the default one in the [Setting a Theme]({%slug styling-apperance-implicit-styles-overview%}) help article.

important Changing the theme using implicit styles will affect all controls that have styles defined in the merged resource dictionaries. This is applicable only for the controls in the scope in which the resources are merged.

  • Choose between the themes and add reference to the corresponding theme assembly (ex: Telerik.Windows.Themes.Windows8.dll). You can see the different themes applied in the Theming examples from our {% if site.site_name == 'WPF' %}WPF Controls Examples{% else %}Silverlight Controls Examples{% endif %} application.

  • Merge the ResourceDictionaries with the namespace required for the controls that you are using from the theme assembly. For the RadPipsPager, you will need to merge the following resources:

    • Telerik.Windows.Controls

The following example demonstrates how to merge the ResourceDictionaries so that they are applied globally for the entire application.

[XAML] Merge the ResourceDictionaries

{{region radpipspager-getting-started-7}} <Application.Resources> <ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries> </Application.Resources> {{endregion}}

Alternatively, you can use the theme of the control via the StyleManager.

The following image shows a RadPipsPager with the Windows8 theme applied.

RadPipsPager with the Windows8 theme

{{ site.framework_name }} RadPipsPager with the Windows8 theme

{% if site.site_name == 'WPF' %}

Telerik UI for WPF Learning Resources

See Also

  • [Navigation Buttons]({%slug radpipspager-navigation-buttons%})