Numeric indicator inside a RadRadialGauge elemnet - nativescript

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>

Related

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.

Wix bootstrapper multiple hyperlink text

My idea is to make multiple license terms link's with different name One of them should be "license terms" next "diagnostics". But then I try to change name I faced this issue:
Here is my code for this RtfTheme.XML:
<Page Name="Install">
<Hypertext Name="EulaHyperlink" X="94" Y="-100" Width="-11" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallLicenseLinkText)</Hypertext>
<Checkbox Name="EulaAcceptCheckbox" Height="30" Width="300" X="120" Y="-67" FontId="3">#(loc.InstallLicenseLinkCheckBox)</Checkbox>
<Button Name="InstallButton" X="160" Y="-30" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallInstallButton)</Button>
<Button Name="InstallCancelButton" X="240" Y="-30" Width="75" Height="23" TabStop="yes" FontId="0">
<Text>Cancel</Text>
<CloseWindowAction />
</Button>
</Page>
Bundle.wxs:
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense" >
<bal:WixStandardBootstrapperApplication
LogoFile="Resources/banner.png" LogoSideFile="Resources/r2.png"
ThemeFile="Resources/RtfTheme.xml"
LocalizationFile="Resources/RtfTheme.wxl"
LicenseUrl="http://opensource.org/licenses/ms-rl" />
<Payload SourceFile="Resources/r2.png"/>
</BootstrapperApplicationRef>
RtfTheme.WXL
<String Id="InstallLicenseLinkText">By installing you accept these <a href="#">license terms</a></String>
<String Id="InstallLicenseLinkCheckBox">Also include <a href="#">diagnostics</a></String>
Maybe whom have same issue and know how can I fix this? Please suggest.
Make your check box the size of the box itself with no text. Add a second <Hypertext> that is positioned right beside the check box.

Is it possible to use an array for element names in Xamarin?

I have this code:
<local:CustomTextCell x:Name="cfs0" />
<local:CustomTextCell x:Name="cfs1" />
<local:CustomTextCell x:Name="cfs2" />
Is there a way that I can use an array instead of using these three names?
The reason is that I would like to use a for loop to change the cell properties.
You can add a name to parent TableSection and use it loop through all the cells.
<TableSection Title="Parent" x:Name="parentSection">
<local:CustomTextCell x:Name="cfs0" />
<local:CustomTextCell x:Name="cfs1" />
<local:CustomTextCell x:Name="cfs2" />
</TableSection>
Add looping logic as following:
foreach (CustomTextCell textCell in parentSection)
{
System.Diagnostics.Debug.WriteLine($"{textCell.Text} - {textCell.IsChecked}");
}

Not able to get DataMemberBinding in the telerik Datagridview

Hello I am using Telerik Rad Controls for the DataGrid view...
I want to display only some required columns in the DataGrid.. so I used this code
<telerik:RadGridView.Columns>
<telerik:GridViewColumn Header="Market Code" />
<telerik:GridViewColumn Header="Market Name" />
</telerik:RadGridView.Columns>
But I was not able to set the binding.. I was not able to set the DataMemberBinding to the column...
It says the property was not found in the GridViewColumn....
<riaControls:DomainDataSource AutoLoad="True"
Height="0"
LoadedData="mKT_MSTRDomainDataSource_LoadedData_1"
x:Name="mKT_MSTRDomainDataSource"
QueryName="GetMKT_MSTRQuery" Width="0" >
<riaControls:DomainDataSource.DomainContext>
<my:GNDataDomainContext />
</riaControls:DomainDataSource.DomainContext>
</riaControls:DomainDataSource>
<telerik:RadGridView Grid.Column="1" AutoGenerateColumns="False"
ItemsSource="{Binding Data,
ElementName=mKT_MSTRDomainDataSource}"
x:Name="mKT_MSTRRadGridView" Width="Auto"
Canvas.Left="290" Height="300" >
<telerik:RadGridView.Columns>
<telerik:GridViewColumn Header="Market Code" DataMemberBinding="" />
<telerik:GridViewColumn Header="Market Name" />
</telerik:RadGridView.Columns>
</telerik:RadGridView>
Can anyone help me where am I making mistake... please
You need to choose an appropriate type of column for binding, e.g. GridViewDataColumn, etc. depending on your data type. You can see the list of pre-defined column types here.
You then need to bind the columns to the data you want to display, with the DataMemberBinding attribute:
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn Header="Market Code" DataMemberBinding="{Binding MarketCode}" />
<telerik:GridViewDataColumn Header="Market Name" DataMemberBinding="{Binding MarketName}"/>
</telerik:RadGridView.Columns>
where MarketCode and MarketName are properties on your data records

Apply the sorting of a datagrid to another datagrid

My client has this requirement :
i.e. a grid with collapsible columns. The easiest way I found to do that is to have 3 separate datagrids and 2 buttons, showing or collapsing the grids.
Here is the associated XAML:
<StackPanel Orientation="Horizontal" Grid.Column="2" Grid.Row="0" VerticalAlignment="Stretch">
<toolkit:DataGridDragDropTarget VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" VerticalAlignment="Stretch">
<sdk:DataGrid Name="Grid1" SelectionChanged="Grid_SelectionChanged" AutoGenerateColumns="False">
<sdk:DataGrid.Columns>
<sdk:DataGridTextColumn Binding="{Binding somefield}" Header="someheader" />
<sdk:DataGridTextColumn Binding="{Binding somefield}" Header="someheader" />
<sdk:DataGridTextColumn Binding="{Binding somefield}" Header="someheader"/>
<sdk:DataGridTextColumn Binding="{Binding somefield}" Header="someheader" />
</sdk:DataGrid.Columns>
</sdk:DataGrid>
</toolkit:DataGridDragDropTarget>
<Button Content=">" Click="Button_Click" Name="btn1" />
<sdk:DataGrid Name="Grid2" SelectionChanged="Grid_SelectionChanged" AutoGenerateColumns="False" ItemsSource="{Binding ItemsSource, ElementName=Grid1}">
<sdk:DataGrid.Columns>
<sdk:DataGridTextColumn Header="someheader" Binding="{Binding somefield}" />
<sdk:DataGridCheckBoxColumn Header="someheader" Binding="{Binding somefield}" />
<sdk:DataGridCheckBoxColumn Header="someheader" Binding="{Binding somefield}" />
<sdk:DataGridTextColumn Header="someheader" Binding="{Binding somefield}" />
<sdk:DataGridTextColumn Header="someheader" Binding="{Binding somefield}" />
</sdk:DataGrid.Columns>
</sdk:DataGrid>
<Button Content=">" Name="btn2" Click="Button_Click"/>
<sdk:DataGrid Name="Grid3" SelectionChanged="Grid_SelectionChanged" AutoGenerateColumns="False" ItemsSource="{Binding ItemsSource, ElementName=Grid1}">
<sdk:DataGrid.Columns>
<sdk:DataGridTextColumn Header="someheader" Binding="{Binding somefield}" />
</sdk:DataGrid.Columns>
</sdk:DataGrid>
</StackPanel>
This is working correctly. My problem occurs when I want to sort one of the grid. As the sorting is internal to the datagrid, the changes are not propagated to the other (even tough they are bound to the same source !).
Is there a way to "propagate" the sorting to the other grids ? I tried to find a way to intercept a sorting event, but it doesn't seem to exist...
Thanks in advance !
Why use 3 database?
It's better to use just 1 database and a Options page where the person can hide his / her columns.
you can hide to columns by using DataGrid.Columns[0].Visibility = Visibility.Collapsed.
You can do this with a button above the column.. or a checkbox somewhere... or a options page. Lots of oppertunaties. The only downside is that this can't be implemented in MVVM since DataGridColumn dont support Visibility Binding.
As a answer to your question:
Perhaps this information helps you, just apply sorting to both datagrids
private void Sort_DataGrid(object source, System.Web.UI.WebControls.DataGridSortCommandEventArgs e)
{
// Never use Queries like this always use Stored procedures
SqlCommand myCommand = new SqlCommand("SELECT * FROM Categories", myConnection);
myCommand.CommandType = CommandType.Text;
SqlDataAdapter myAdapter = new SqlDataAdapter(myCommand);
DataSet ds = new DataSet();
myAdapter.Fill(ds,"Categories");
DataView dv = new DataView(ds.Tables["Categories"]);
if( (numberDiv%2) == 0 )
dv.Sort = e.SortExpression + " " + "ASC";
else
dv.Sort = e.SortExpression + " " + "DESC";
numberDiv++;
myDataGrid.DataSource = dv;
myDataGrid.DataBind();
}
Source: http://www.codeproject.com/KB/webforms/SortingDataGridColumns.aspx
If you stick to the three DataGrid solution I think you'd better wrap them in a control and add some sort buttons to this control. The buttons should then trigger the sorting of ALL datagrids.
Another way is to use 1 DataGrid and change the visibilty of the column(s) you would want to hide.

Resources