Manage Custom Assets
XamlFiddle offers a convenient feature that allows users to integrate images and videos into their projects. Follow the steps below to access, upload, and manage these assets.
Accessing the Custom Assets Feature
To open the custom assets manager, navigate to the menu: Manage > All Custom Assets
Once selected, the Custom Assets Manager dialog will appear:
Uploading a New Image or Video
To upload an image or video:
-
Right-click on the Custom folder:
-
Choose Upload from the context menu:
-
A file dialog will appear. Select the image or video you wish to upload (for example, an image):
-
Once uploaded, expand the Custom folder and click on the image (e.g., profile.jpg):
The process for uploading a video is the same as uploading an image.
Integrating an Image into a XAML Item
To integrate an image into a XAML item:
-
First, copy the image code from the previous section:
-
Go to the selected XAML item. Close the Custom Assets Manager dialog to view the selected XAML item:
-
Update the XAML item by pasting the code to display the image:
This converter is used to convert the image or video URL into a BitmapSource.
<Page.Resources>
<converters:RelativePathToImageVideoConverter x:Key="RelativePathToImageVideoConverter" />
</Page.Resources>
This XAML code is used for rendering an image.
<Image Source="{Binding Source='Assets/Custom/profile.jpg', Converter={StaticResource RelativePathToImageVideoConverter}}" />
Press Ctrl+S to save the image.
Deleting an Image
To delete an image:
-
Open the Custom Assets Manager menu:
-
Expand the Custom folder by clicking on it:
-
Right-click on the image (e.g., profile.jpg) and select Delete:
-
A deletion confirmation dialog will appear. Click Yes to confirm:
-
After confirming, the image will be deleted:
Opening the Containing Folder
To open the folder containing your custom assets:
-
Open the Custom Assets Manager menu:
-
Right-click on the Custom folder and select Open Containing Folder:
-
You will be taken to the folder where the custom assets are stored: