зеркало из https://github.com/telerik/maui-docs.git
Address comments
This commit is contained in:
Родитель
ec8e6d3fc1
Коммит
53bae01721
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
title: Methods
|
||||
page_title: .NET MAUI SlideView Documentation - Methods
|
||||
description: Review the different methods you can call when using the Slideview for .NET MAUI.
|
||||
position: 11
|
||||
slug: slideview-methods
|
||||
---
|
||||
|
||||
# .NET MAUI SlideView Methods
|
||||
|
||||
The SlideView for .NET MAUI gives you the option to navigate to the desired item by using the `NavigateToIndex(int index, bool useAnimation = true)` method. The parameters are:
|
||||
|
||||
* `index (int)`—Specifies the index of the item the control navigates to.
|
||||
* `useAnimation (bool)`—Specifies whether animation is used during navigation. The default value is `true`.
|
||||
|
||||
## See Also
|
||||
|
||||
- [Using Navigation Buttons in SlideView]({%slug slideview-interaction%})
|
||||
- [Executing Commands on Slide Action]({%slug slideview-commands%})
|
||||
- [Using an Item Template in SlideView]({%slug slideview-item-template%})
|
||||
- [Changing the SlideView Appearance through a Control Template]({%slug slideview-control-template%})
|
||||
- [Styling the SlideView Component]({%slug slideview-navigation-buttons-styling%})
|
||||
- [Styling the SlideView Indicators]({%slug indicators-styling%})
|
|
@ -21,50 +21,43 @@ In this tutorial, you will enhance an existing .NET MAUI application by adding a
|
|||
|
||||
@[template](/_contentTemplates/get-started.md#start-free-trial)
|
||||
|
||||
## Step 1: Downnload Telerik MAUI extension for Visaul Studio Code
|
||||
## Step 1: Download the Extension for Visual Studio Code
|
||||
|
||||
To use the **Telerik UI for .NET MAUI Template Wizard**, install the `Telerik UI for .NET MAUI Productivity Tools` extension. You can get the extension from:
|
||||
To create a new MAUI project, you will use the **Telerik UI for .NET MAUI Template Wizard**, which is provided by the Telerik UI for .NET MAUI Productivity Tools extension. You can get the extension from <a href="https://marketplace.visualstudio.com/items?itemName=TelerikInc.telerik-maui-productivity-tools" target="_blank">the Visual Studio Code Marketplace.</a>
|
||||
|
||||
* <a href="https://marketplace.visualstudio.com/items?itemName=TelerikInc.telerik-maui-productivity-tools" target="_blank">The Visual Studio Code Marketplace.</a>
|
||||
## Step 2: Create a New MAUI Project
|
||||
|
||||
## Step 2: Start the Telerik MAUI Wizard
|
||||
To start the **Create New Project**:
|
||||
|
||||
You can start the Telerik UI for .NET MAUI Template Wizard in either of the following ways:
|
||||
1. Click the **Telerik Extensions Information** icon in the Visual Studio Code activity bar.
|
||||
1. Click on the **Telerik Extensions Information** icon.
|
||||
1. Select the **MAUI** tab.
|
||||
1. Click **Create New Project**. This opens the **Telerik UI for .NET MAUI Template Wizard**.
|
||||
|
||||
* Click the **Telerik Extensions Information** icon in the Visual Studio Code activity bar.
|
||||
|
||||
1. Click on the **Telerik Extensions Information** icon
|
||||
1. Select **MAUI** tab
|
||||
1. Click **Create New Project**.
|
||||
1. The **Telerik UI for .NET MAUI Template Wizard** opens
|
||||
1. Using the Template Wizard you can create a new **Blank App** or **Blank Shell App**.
|
||||
|
||||
![Telerik UI for .NET MAUI VS Code Extension](../installation/vs-code-integration/images/telerik-vs-code-extension.png)
|
||||
|
||||
## Step 3: Create a .NET MAUI App
|
||||
Next, set up the new MAUI project:
|
||||
|
||||
1. Enter a name for your app.
|
||||
|
||||
1. Select an empty folder for your project. If the folder is not empty, the file explorer opens again.
|
||||
|
||||
1. Select the **Target Framework** and click the **Create Project** button.
|
||||
1. Wait for Visual Studio Code to create the project and complete its configuration.
|
||||
|
||||
1. Choose the **Debug Target**:
|
||||
![Telerik UI for .NET MAUI VS Code Extension](../installation/vs-code-integration/images/telerik-vs-code-extension.png)
|
||||
|
||||
6.1. Open a C# or XAML file, for example, `App.xaml`.
|
||||
Next, choose the **Debug Target**:
|
||||
|
||||
6.2. Click the curly brackets symbol **{ }** in the bottom right corner of Visual Studio Code.
|
||||
1. Open a C# or XAML file, for example, `App.xaml`.
|
||||
1. Click the curly brackets symbol **{ }** in the bottom right corner of Visual Studio Code.
|
||||
|
||||
* If you are working on a Mac machine, select **My Mac**.
|
||||
* If you are working on a Windows machine, select **Local Machine**.
|
||||
|
||||
![Telerik UI for .NET MAUI - create new MAUI project in Visual Studio](./images/gs-vs-code-select-debug-target.png)
|
||||
![Telerik UI for .NET MAUI - create new MAUI project in Visual Studio](./images/gs-vs-code-select-debug-target.png)
|
||||
|
||||
1. Press `F5` to start a debug session. If Visual Studio Code prompts you to select a debugger, select C#.
|
||||
|
||||
If you encounter any issues creating the basic project, see the complete guide in <a href="https://learn.microsoft.com/en-us/dotnet/maui/get-started/first-app?pivots=devices-windows&view=net-maui-8.0&tabs=visual-studio-code" target="_blank">Microsoft's .NET MAUI documentation</a>.
|
||||
|
||||
## Step 4: Add the Telerik NuGet Server
|
||||
## Step 3: Add the Telerik NuGet Server
|
||||
|
||||
Telerik maintains a NuGet feed with official UI for .NET MAUI releases and service packs. These packages are available for registered users with an active trial or commercial license. Adding the Telerik NuGet server as a source lets you download and install Telerik packages containing controls and utilities. As Visual Studio Code does not offer a built-in NuGet packet manager, use .NET CLI to add a new package source.
|
||||
|
||||
|
@ -76,7 +69,7 @@ dotnet nuget add source https://nuget.telerik.com/v3/index.json --name TelerikNu
|
|||
|
||||
>caution Storing passwords in plain text is strongly discouraged. This guide uses the `--store-password-in-clear-text` only for simplicity. For real-world scenarios, use secure methods, such as encrypted passwords or API keys. See <a href="https://learn.microsoft.com/en-us/nuget/consume-packages/consuming-packages-authenticated-feeds#security-best-practices-for-managing-credentials" target="_blank">Microsoft's security best practices</a> for more information on how to securely store your NuGet source credentials.
|
||||
|
||||
## Step 5: Install the Telerik UI for .NET MAUI Controls
|
||||
## Step 4: Install the Telerik UI for .NET MAUI Controls
|
||||
|
||||
After configuring the Telerik NuGet source, install Telerik UI for .NET MAUI:
|
||||
|
||||
|
@ -96,15 +89,15 @@ After configuring the Telerik NuGet source, install Telerik UI for .NET MAUI:
|
|||
dotnet add package Telerik.UI.for.Maui
|
||||
```
|
||||
|
||||
## Step 6: Add the Telerik Namespace and Register the Controls
|
||||
## Step 5: Add the Telerik Namespace and Register the Controls
|
||||
|
||||
@[template](/_contentTemplates/get-started.md#add-namespace-register-controls)
|
||||
|
||||
## Step 7: Add a Telerik UI Component
|
||||
## Step 6: Add a Telerik UI Component
|
||||
|
||||
@[template](/_contentTemplates/get-started.md#add-telerik-component)
|
||||
|
||||
## Step 8: Add Custom Content to the TemplatedButton
|
||||
## Step 7: Add Custom Content to the TemplatedButton
|
||||
|
||||
@[template](/_contentTemplates/get-started.md#add-custom-content)
|
||||
|
||||
|
|
|
@ -21,13 +21,11 @@ In this tutorial, you will enhance an existing .NET MAUI application by adding a
|
|||
|
||||
@[template](/_contentTemplates/get-started.md#start-free-trial)
|
||||
|
||||
## Step 1: Download Telerik MAUI Extension
|
||||
## Step 1: Download the Extension for Visual Studio
|
||||
|
||||
To use the **Telerik UI for .NET MAUI Create New Project** wizard, install the Telerik UI for .NET MAUI Visual Studio Extension. You can get the extension from:
|
||||
To use the **Telerik UI for .NET MAUI Create New Project** wizard, install the Telerik UI for .NET MAUI Visual Studio Extension. You can get the extension from <a href="https://marketplace.visualstudio.com/items?itemName=TelerikInc.telerik-maui-productivity-tools" target="_blank">the Visual Studio Code Marketplace.</a>
|
||||
|
||||
* <a href="https://marketplace.visualstudio.com/items?itemName=TelerikInc.ProgressTelerikMAUIExtensions" target="_blank">The Visual Studio Marketplace.</a>
|
||||
|
||||
## Step 2: Start the Telerik MAUI Extension
|
||||
## Step 2: Create a New Project
|
||||
|
||||
To start the wizard, use the [Project](#project-menu) menu.
|
||||
|
||||
|
@ -36,23 +34,14 @@ To start the wizard, use the [Project](#project-menu) menu.
|
|||
|
||||
![Create a new project dialog with maui in the search field and results](../installation/vs-integration/images/vsextensions_createapp.png)
|
||||
|
||||
1. Select one of the supported project templates:
|
||||
|
||||
* **Telerik .NET MAUI App - Configurable Wizard**—Represents a configurable wizard, which contains various predefined application templates that include the Telerik .NET MAUI suite setup.
|
||||
* **Telerik .NET MAUI Blank App**—Represents a blank project for creating a .NET MAUI application that includes the Telerik .NET MAUI suite setup.
|
||||
* **Telerik .NET MAUI Blank Shell App**—Creates a blank .NET MAUI Shell application. You can use this project as a .NET MAUI Shell example. In addition, you can use features like Shell Navigation, .NET MAUI Shell flyout, and .NET MAUI Shell tabs. For more details on .NET MAUI Shell, review the official [Microsoft documentation](https://learn.microsoft.com/en-us/dotnet/maui/fundamentals/shell/).
|
||||
|
||||
1. Select the **Telerik .NET MAUI Blank App** which represents a blank project for creating a .NET MAUI application that includes the Telerik .NET MAUI suite setup.
|
||||
|
||||
## Step 3: Configure the Project
|
||||
|
||||
1. The next step lets you configure your **Telerik UI for .NET MAUI** project by setting your project name and its location.
|
||||
Configure your **Telerik UI for .NET MAUI** project by setting your project name and its location.
|
||||
|
||||
![Telerik .NET MAUI App configurable wizard initial screen within the Create your new project dialog](../installation/vs-integration/images/vsextensions_configureapp.png)
|
||||
|
||||
1. (Optional) When using the **Telerik .NET MAUI App - Configurable Wizard** project template, an additional screen for choosing the predefined application template loads:
|
||||
|
||||
![Create new project dialog in the wizard with a blank Telerik UI for .NET MAUI app](../installation/vs-integration/images/vsextensions_newproject-selection.png)
|
||||
|
||||
Finally, Visual Studio opens the solution, which is pre-configured to use the Telerik UI for .NET MAUI controls and has the `Telerik.UI.for.Maui` NuGet package installed.
|
||||
|
||||
## Step 4: Add the Telerik NuGet Server
|
||||
|
|
|
@ -10,9 +10,9 @@ res_type: kb
|
|||
|
||||
## Environment
|
||||
|
||||
| Telerik Version | .NET Version | Product
|
||||
| --- | --- | --- |
|
||||
| Telerik UI for MAUI 8.0.0 | NET 9 | Telerik NuGet package |
|
||||
| Telerik Version | .NET Version | Product | Author |
|
||||
| --- | --- | --- | --- |
|
||||
| Telerik UI for MAUI 8.0.0 | NET 9 | Telerik NuGet package | [Dobrinka Yordanova](https://www.telerik.com/blogs/author/dobrinka-yordanova)|
|
||||
|
||||
## Description
|
||||
|
||||
|
@ -141,7 +141,7 @@ The `Binaries/Net9` folder contain the Android, iOS, MacCatalyst, and WinUI plat
|
|||
|
||||
**5.** If you are using Telerik MAUI controls which depend on `SkiaSharp` add the `SkiaSharp.Views.Maui.Controls` package to the project:
|
||||
|
||||
```
|
||||
```xml
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.0" />
|
||||
|
@ -155,7 +155,7 @@ To visualize the Telerik controls, register them in the `MauiProgram.cs` file of
|
|||
|
||||
**1.** In the `MauiProgram.cs` file, add the following using statement:
|
||||
|
||||
```xml
|
||||
```C#
|
||||
using SkiaSharp.Views.Maui.Controls.Hosting;
|
||||
using Telerik.Maui.Controls;
|
||||
```
|
||||
|
|
|
@ -65,7 +65,7 @@ To modify the theme resources:
|
|||
|
||||
## Merging the New Resource Dictionary in App.xaml
|
||||
|
||||
Once you customize the colors and styles, add the new resource dictionary to the `App.xaml` and make sure you merge `CustomTelerikSwatch.xaml` аfter the `TelerikTheming` file:
|
||||
Once you customize the colors and styles, add the new resource dictionary to the `App.xaml` and make sure you merge `CustomTelerikSwatch.xaml` after the `TelerikTheming` file:
|
||||
|
||||
```XAML
|
||||
<Application.Resources>
|
||||
|
|
Загрузка…
Ссылка в новой задаче