
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
github.com/geeksltd/zebble.carousel
Carousel plugin allows the user to swipe from side to side to navigate through views, like a gallery slider.
<Carousel Id="MyCarousel">
<ImageView Path="..../Slide1.png" />
<ImageView Path="..../Slide2.png" />
<ImageView Path="..../Slide3.png" />
...
</Carousel>
For adding a slide view in code behind to you Carousel use AddSlide(myView) method.
MyCarousel.AddSlide(new Canvas());
You can style the Carousel-Bullet and it's active state like this:
Carousel-Bullet{
background-color:#eee;
&:active{ background-color:#333;
}
}
In the above example, you can use a loop to dynamically create slides from a data source. For instance, the following code will show a slide for each image file inside the MySlides folder in the application resources:
<Carousel Id="MyCarousel">
<z-foreach var="file" in="@GetSlideFiles()">
<ImageView Path="@file" />
</z-foreach>
<AnyOtherView />
</Carousel>
Code behind:
IEnumerable<string> GetSlideFiles()
{
return Device.IO.Directory("Images/MySlides").GetFiles().Select(x => x.FullName);
}
Property | Type | Android | iOS | Windows |
---|---|---|---|---|
CenterAligned | bool | x | x | x |
SlideWidth | float? | x | x | x |
EnableZooming | bool | x | x | x |
Method | Return Type | Parameters | Android | iOS | Windows |
---|---|---|---|---|---|
AddSlide | Task | View => child | x | x | x |
Next | Task | bool => animate | x | x | x |
Previous | Task | bool => animate | x | x | x |
Normal carousel is very flexible. Each slide can be any view object. But it requires all slides to be pre-rendered, which is not efficient if you have many.
In cases where you have several views all with the same templates, it's much more efficient to use RecyclerCarousel
which is much much faster.
<RecyclerCarousel z-of="Product, SlideTemplate" DataSource="@Products">
<z-Component z-type="SlideTemplate" z-base="RecyclerCarouselSlide[Product]">
<ImageView Path="@{Item, x=>x?.Thumbnail}" />
<TextView Text="@{Item, x=>x?.Name}"/>
</z-Component>
</RecyclerCarousel>
In the above example, Products
is an IEnumerable<Product>
which is the data source from which to populate the slides. For example you may have 10 product instances in an array. The carousel will always render a maximum of 3 items. As you swipe through the slides, it will reuse the slide ui objects and just change their X position and also update the data source which is the Item
property. Please note that Item
is a Bindable<Product>
which means you need to use the @{Item, x=>x.Something}
syntax in your template.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.