|
API |
Values |
Description |
|
ListViewCachingStrategy- to skip the reusing for scrolling. |
CreateNewTemplate |
Creates new element for every data in ItemsSource. |
|
|
RecycleTemplate |
Reuses elements on scrolling.
Default value: RecycleTemplate |
|
ItemsSourceChangeCachingStrategy - to skip the reusing of list items on items source property changed. |
RecycleItems |
The ListView items will be recycled on ItemsSource changes.
Default value: RecycleItems |
|
|
ClearItems |
The existing ListView items will be cleared and create new list items when ItemsSource changed. |
<customControls:PriceDisplay
Value="{Binding Share}"
HasFocus="{Binding Source={x:Reference BehaviorShare}, Path=IsChecked}">
<customControls:PriceDisplay.Behaviors>
<behavious:RadioBehavior x:Name="BehaviorShare" GroupName="SplitPage" />
</customControls:PriceDisplay.Behaviors>
</customControls:PriceDisplay>
|
public class Behavior : Behavior<Grid>
{
private bool isChecked;
public bool IsChecked
{
get
{
return isChecked;
}
set
{
isChecked = value;
this.OnPropertyChanged();
}
}
protected override void OnAttachedTo(Grid bindable)
{
bindable.BindingContextChanged += Bindable_BindingContextChanged;
base.OnAttachedTo(bindable);
}
private void Bindable_BindingContextChanged(object sender, EventArgs e)
{
if (((sender as Grid).BindingContext as Contacts).ContactName == "William")
IsChecked = true;
else
IsChecked = false;
}
} |