How to customize progress bar including text in Xamarin - xamarin

I am having an idea to make a progress bar that contains properties like the attached image. However I don't know how to implement xaml UI so that it is perfect. Ask for help. Thank you

You could use StepProgressBar.
Install from NuGet: Syncfusion.Xamarin.SfProgressBar
Code:
<progressBar:SfStepProgressBar Orientation="Horizontal" HorizontalOptions="Center" VerticalOptions="Center">
<progressBar:StepView PrimaryText="10%" SecondaryText="0K" Status="InProgress"/>
<progressBar:StepView PrimaryText="11%" SecondaryText="100K" Status="NotStarted"/>
<progressBar:StepView PrimaryText="12%" SecondaryText="300K" Status="NotStarted"/>
<progressBar:StepView PrimaryText="13%" SecondaryText="500K" Status="NotStarted"/>
<progressBar:StepView PrimaryText="14%" SecondaryText="900K" Status="NotStarted"/>
<progressBar:StepView PrimaryText="15%" SecondaryText="1000K" Status="NotStarted"/>
</progressBar:SfStepProgressBar>

Related

Industry Icon with NonLinear or CompanionAd in VAST 4.2

It says 'This feature is only offered for Linear Ads because icons can be easily inserted in NonLinear ads and companion creative using existing features.' in VAST 4.2 document. But I don't know how it looks like.
I try this
<NonLinear id="GDFP" width="480" height="70" minSuggestedDuration="00:00:05" scalable="true" maintainAspectRatio="true">
<StaticResource creativeType="image/png">
<![CDATA[https://pagead2.googlesyndication.com/pagead/imgad?id=CICAgKDTwKyTLBDgAxhGMghR083HVMUH8w]]>
</StaticResource>
<NonLinearClickThrough>
<![CDATA[https://pubads.g.doubleclick.net/pcs/click]]>
</NonLinearClickThrough>
<NonLinearClickTracking>
<![CDATA[https://pubads.g.doubleclick.net/pcs/click]]>
</NonLinearClickTracking>
</NonLinear>
<NonLinear>
<Icon program="DAA" width="77" height="15" xPosition="right" yPosition="top" offset="00:00:00">
<StaticResource creativeType="image/png"><![CDATA[https://s.aolcdn.com/ads/adchoices.png]]></StaticResource>
</Icon>
</NonLinear>
and it do not work.
I also try this
<NonLinear id="GDFP" width="480" height="70" minSuggestedDuration="00:00:05" scalable="true" maintainAspectRatio="true">
<StaticResource creativeType="image/png">
<![CDATA[https://pagead2.googlesyndication.com/pagead/imgad?id=CICAgKDTwKyTLBDgAxhGMghR083HVMUH8w]]>
</StaticResource>
<NonLinearClickThrough>
<![CDATA[https://pubads.g.doubleclick.net/pcs/click]]>
</NonLinearClickThrough>
<NonLinearClickTracking>
<![CDATA[https://pubads.g.doubleclick.net/pcs/click]]>
</NonLinearClickTracking>
</NonLinear>
<NonLinear program="DAA" width="77" height="15" xPosition="right" yPosition="top" offset="00:00:00">
<StaticResource creativeType="image/png"><![CDATA[https://s.aolcdn.com/ads/adchoices.png]]></StaticResource>
</NonLinear>
and it do not work, NonLinear tag seems do not allow program, xPosition, yPosition attribute.
Can you give a sample?

Nativescript Vue: Why does position of code matter in a Dock Layout matter?

Why does this following code produce this result: https://imgur.com/a/lQhLs8o ?
However, if I move the BottomNavigatorBar component to top position before CountryListComponent, it produces the desired result that looks like this: https://imgur.com/a/23z7bb2 ?
<template>
<Page actionBarHidden="true">
<DockLayout height="100%">
// first
<CountryListComponent dock="top">
// second
<BottomNavigationBar dock="bottom" activeColor="pink"
inactiveColor="yellow"
backgroundColor="black"
verticalAlignment="bottom"
#tabSelected="this.changeTab"
row="1">
<BottomNavigationTab title="Fiaarst" icon="icon-29.png" />
<BottomNavigationTab title="Second" icon="icon-29.png" />
<BottomNavigationTab title="Third" icon="icon-29.png" />
</BottomNavigationBar>
</DockLayout>
</Page>
</template>
CountryListComponent
<template>
<StackLayout backgroundColor="blue">
</StackLayout>
</template>
Refer the DockLayout documentation, by default stretchLastChild will be true which means BottomNavigationBar will take entire space if it's last child and vice versa.

Numeric indicator inside a RadRadialGauge elemnet

how can i put a Numeric indicator inside a RadRadialGauge?
<RadRadialGauge title="Exp" height="150" width="150">
<TitleStyle tkRadialGaugeTitleStyle textColor="gray" textSize="12" verticalOffset="90"></TitleStyle>
<RadialScale tkRadialGaugeScales startAngle="270" sweepAngle="360" minimum="0" maximum="100">
<ScaleStyle tkRadialScaleStyle ticksVisible="false" labelsVisible="false" lineThickness="0"></ScaleStyle>
<RadialBarIndicator tkRadialScaleIndicators minimum="0" maximum="100" location="0.75">
<BarIndicatorStyle tkRadialBarIndicatorStyle fillColor="rgba(192,192,192,0.8)" barWidth="0.1"></BarIndicatorStyle>
</RadialBarIndicator>
<RadialBarIndicator tkRadialScaleIndicators minimum="0" maximum="30" location="0.75" isAnimated="true">
<BarIndicatorStyle tkRadialBarIndicatorStyle cap="Round" fillColor="rgba(67,183,120,0.9)" barWidth="0.1"></BarIndicatorStyle>
</RadialBarIndicator>
</RadialScale>
how can i solve it?
Resolved: i use title to insert the value
<RadRadialGauge title ="{{value}}%"height="150" width="150" >
<TitleStyle tkRadialGaugeTitleStyle textColor="gray" textSize="30"
textAlignment="center" verticalOffset="0" horizontalOffset="0"></TitleStyle>

how to make a radautocompletetextview with prefilled using nativescript-angular

how to make a radautocompletetextview with prefilled using nativescript-angular?
This is how i am trying to do it:
HTML:
<RadAutoCompleteTextView id="rice-cake" (didAutoComplete)="onTokenSelected($event)" marginTop="40px" style="border-width:0.5;border-radius:5px;border-color:#E6E6E6;"
#autocmp [items]="dataItems" suggestMode="Suggest" displayMode="Plain">
<SuggestionView tkAutoCompleteSuggestionView suggestionViewHeight="150">
`enter code here`<ng-template tkSuggestionItemTemplate let-item="item">
<StackLayout orientation="vertical" padding="10">
<Label [text]="item.text"></Label>
</StackLayout>
</ng-template>
</SuggestionView>
</RadAutoCompleteTextView>
TypeScript:
this.autocomplete =
<RadAutoCompleteTextView>view.getViewById(this.page,"rice-cake");
console.log(JSON.stringify(this.autocomplete))
var token = new TokenModel(_result.dish, undefined);
this.autocomplete.addToken(token)
You may want to check this out:
https://github.com/telerik/nativescript-ui-feedback/issues/323

ChangePropertyAction on Image Control in LongListSelector item template

I have a long list selector and i have a datatemplate as item template, containing an image. I want the source to change based on a property from the model. I tried with a converter but i could't get it to work.
Now i'm trying with triggers. I have:
<Image Name="MovieThumbnail">
<i:Interaction.Triggers>
<ei:DataTrigger Binding="{Binding DataContext.IsCategoryCurrent,ElementName=LayoutRoot}" Value="true">
<ei:ChangePropertyAction TargetObject="{Binding ElementName=MovieThumbnail}" TargetName="Source" Value="{Binding Path=Image120x170}" PropertyName="Source"/>
</ei:DataTrigger>
<ei:DataTrigger Binding="{Binding DataContext.IsCategoryCurrent,ElementName=LayoutRoot}" Value="false">
<ei:ChangePropertyAction TargetObject="{Binding ElementName=MovieThumbnail}" TargetName="Source" Value="{x:Null}" PropertyName="Source"/>
</ei:DataTrigger>
</i:Interaction.Triggers>
</Image>
It work almost how i want it to, except that images repeat themselves. As in a movie has the picture of another movie. I think it's because i bind by element name and the image control has multiple instances (one for each item), but i would think they can't see each other. Any help highly appreciated.
EDIT:
After further investigation, it seems that this happens because of the long list selector.
I first load 40 items, and then load another 40, but the second batch of 40 items get the pictures from the first batch. If i raise a property changed event, then the pictures from the second batch are set on all items repeating themselves. I have no idea why this is happening.
If i load another 40 and raise property changed on IsCategoryCurrent again, the pictures from the 3rd batch get set 3 times.
I managed to fix it:
<Image
Grid.RowSpan="2"
Name="MovieThumbnail"
Stretch="Fill"
Width="130" Height="195"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<i:Interaction.Triggers>
<ei:DataTrigger Binding="{Binding DataContext.IsCategoryCurrent,ElementName=LayoutRoot}"
Value="true">
<ei:ChangePropertyAction TargetObject="{Binding ElementName=MovieThumbnail}"
TargetName="Source"
PropertyName="Source">
<ei:ChangePropertyAction.Value>
<BitmapImage CreateOptions="BackgroundCreation"
UriSource="{Binding Path=Image120x170}"/>
</ei:ChangePropertyAction.Value>
</ei:ChangePropertyAction>
</ei:DataTrigger>
<ei:DataTrigger Binding="{Binding DataContext.IsCategoryCurrent,ElementName=LayoutRoot}"
Value="false">
<ei:ChangePropertyAction TargetObject="{Binding ElementName=MovieThumbnail}"
TargetName="Source"
Value="{x:Null}"
PropertyName="Source"/>
</ei:DataTrigger>
</i:Interaction.Triggers>
</Image>
And i raise a property changed event of IsCategoryCurrent at every change.

Resources