_styleClass = value;
- if (_styleClass != null) {
- _classStyleProperties = new List<BindableProperty> ();
- foreach (var styleClass in _styleClass) {
- var classStyleProperty = BindableProperty.Create ("ClassStyle", typeof(IList<Style>), typeof(View), default(IList<Style>),
+ if (_styleClass != null)
+ {
+ _classStyleProperties = new List<BindableProperty>();
+ foreach (var styleClass in _styleClass)
+ {
+ var classStyleProperty = BindableProperty.Create("ClassStyle", typeof(IList<Style>), typeof(View), default(IList<Style>),
propertyChanged: (bindable, oldvalue, newvalue) => ((View)bindable)._mergedStyle.OnClassStyleChanged());
- _classStyleProperties.Add (classStyleProperty);
- Target.OnSetDynamicResource (classStyleProperty, Tizen.NUI.Binding.Style.StyleClassPrefix + styleClass);
+ _classStyleProperties.Add(classStyleProperty);
+ Target.OnSetDynamicResource(classStyleProperty, Tizen.NUI.Binding.Style.StyleClassPrefix + styleClass);
}
}
}
void OnClassStyleChanged()
{
- ClassStyles = _classStyleProperties.Select (p => (Target.GetValue (p) as IList<Style>)?.FirstOrDefault (s => s.CanBeAppliedTo (TargetType))).ToList ();
+ ClassStyles = _classStyleProperties.Select(p => (Target.GetValue(p) as IList<Style>)?.FirstOrDefault(s => s.CanBeAppliedTo(TargetType))).ToList();
}
void OnImplicitStyleChanged()
{
return;
}
- while (true) {
+ while (true)
+ {
BindableProperty implicitStyleProperty = BindableProperty.Create(nameof(ImplicitStyle), typeof(Style), typeof(View), default(Style),
propertyChanged: (bindable, oldvalue, newvalue) => OnImplicitStyleChanged());
_implicitStyles.Add(implicitStyleProperty);