9 instantiations of Style
Microsoft.Maui.Controls (9)
Device.cs (6)
165
public static readonly Style TitleStyle = new
Style
(typeof(Label)) { BaseResourceKey = TitleStyleKey };
167
public static readonly Style SubtitleStyle = new
Style
(typeof(Label)) { BaseResourceKey = SubtitleStyleKey };
169
public static readonly Style BodyStyle = new
Style
(typeof(Label)) { BaseResourceKey = BodyStyleKey };
171
public static readonly Style ListItemTextStyle = new
Style
(typeof(Label)) { BaseResourceKey = ListItemTextStyleKey };
173
public static readonly Style ListItemDetailTextStyle = new
Style
(typeof(Label)) { BaseResourceKey = ListItemDetailTextStyleKey };
175
public static readonly Style CaptionStyle = new
Style
(typeof(Label)) { BaseResourceKey = CaptionStyleKey };
Shell\BaseShellItem.cs (3)
365
var defaultLabelClass = new
Style
(typeof(Label))
373
var defaultImageClass = new
Style
(typeof(Image))
381
var defaultGridClass = new
Style
(typeof(Grid))
79 references to Style
Microsoft.Maui.Controls (75)
BindablePropertyConverter.cs (2)
47
if (parent is
Style
style)
155
if (parents[5] is
Style
style)
Device.cs (6)
165
public static readonly
Style
TitleStyle = new Style(typeof(Label)) { BaseResourceKey = TitleStyleKey };
167
public static readonly
Style
SubtitleStyle = new Style(typeof(Label)) { BaseResourceKey = SubtitleStyleKey };
169
public static readonly
Style
BodyStyle = new Style(typeof(Label)) { BaseResourceKey = BodyStyleKey };
171
public static readonly
Style
ListItemTextStyle = new Style(typeof(Label)) { BaseResourceKey = ListItemTextStyleKey };
173
public static readonly
Style
ListItemDetailTextStyle = new Style(typeof(Label)) { BaseResourceKey = ListItemDetailTextStyleKey };
175
public static readonly
Style
CaptionStyle = new Style(typeof(Label)) { BaseResourceKey = CaptionStyleKey };
IStyleElement.cs (1)
7
Style
Style { get; }
MergedStyle.cs (18)
25
IList<
Style
> _classStyles;
49
Application.Current?.FindMauiContext()?.CreateLogger<
Style
>()?.LogWarning("Style TargetType {FullName} is not compatible with element target type {TargetType}", value.TargetType.FullName, TargetType);
73
var classStyleProperty = BindableProperty.Create("ClassStyle", typeof(IList<
Style
>), typeof(Element), default(IList<
Style
>),
76
Target.OnSetDynamicResource(classStyleProperty, Maui.Controls.
Style
.StyleClassPrefix + styleClass, SetterSpecificity.DefaultValue);
88
IList<
Style
> ClassStyles
110
foreach (
var
classStyle in ClassStyles)
123
foreach (
var
classStyle in ClassStyles)
130
ClassStyles = _classStyleProperties.Select(p => (Target.GetValue(p) as IList<
Style
>)?.FirstOrDefault(s => s.CanBeAppliedTo(TargetType))).ToList();
139
var
implicitStyle = (
Style
)Target.GetValue(implicitStyleProperty);
159
BindableProperty implicitStyleProperty = BindableProperty.Create(nameof(ImplicitStyle), typeof(
Style
), typeof(NavigableElement), default(
Style
),
177
BindableProperty implicitStyleProperty = BindableProperty.Create(nameof(ImplicitStyle), typeof(
Style
), typeof(NavigableElement), default(
Style
),
187
void SetStyle(IStyle implicitStyle, IList<
Style
> classStyles, IStyle style)
196
foreach (
var
classStyle in ClassStyles)
210
foreach (
var
classStyle in ClassStyles)
PlatformConfiguration\TizenSpecific\VisualElement.cs (1)
16
/// <summary>Bindable property for <see cref="
Style
"/>.</summary>
ResourceDictionary.cs (6)
343
public void Add(
Style
style)
349
IList<
Style
> classes;
351
if (!TryGetValue(
Style
.StyleClassPrefix + style.Class, out outclasses) || (classes = outclasses as IList<
Style
>) == null)
352
classes = new List<
Style
>();
354
this[
Style
.StyleClassPrefix + style.Class] = classes;
ResourcesExtensions.cs (8)
25
else if (res.Key.StartsWith(
Style
.StyleClassPrefix, StringComparison.Ordinal))
27
var mergedClassStyles = new List<
Style
>(resources[res.Key] as List<
Style
>);
28
mergedClassStyles.AddRange(res.Value as List<
Style
>);
40
else if (res.Key.StartsWith(
Style
.StyleClassPrefix, StringComparison.Ordinal))
42
var mergedClassStyles = new List<
Style
>(resources[res.Key] as List<
Style
>);
43
mergedClassStyles.AddRange(res.Value as List<
Style
>);
Shell\BaseShellItem.cs (3)
365
var
defaultLabelClass = new Style(typeof(Label))
373
var
defaultImageClass = new Style(typeof(Image))
381
var
defaultGridClass = new Style(typeof(Grid))
Span.cs (5)
21
public static readonly BindableProperty StyleProperty = BindableProperty.Create(nameof(Style), typeof(
Style
), typeof(Span), default(
Style
),
22
propertyChanged: (bindable, oldvalue, newvalue) => ((Span)bindable)._mergedStyle.Style = (
Style
)newvalue, defaultBindingMode: BindingMode.OneWay);
31
public
Style
Style
33
get { return (
Style
)GetValue(StyleProperty); }
Style.cs (16)
16
readonly BindableProperty _basedOnResourceProperty = BindableProperty.CreateAttached("BasedOnResource", typeof(
Style
), typeof(
Style
), default(
Style
),
21
Style
_basedOnStyle;
40
public
Style
BasedOn
49
Style
oldValue = _basedOnStyle;
138
void BasedOnChanged(
Style
oldValue,
Style
newValue)
147
Style
GetBasedOnResource(BindableObject bindable) => (
Style
)bindable.GetValue(_basedOnResourceProperty);
151
Style
style = (bindable as IStyleElement).Style;
157
style.UnApplyCore(bindable, (
Style
)oldValue);
158
style.ApplyCore(bindable, (
Style
)newValue, (SetterSpecificity)objectspecificity);
163
void ApplyCore(BindableObject bindable,
Style
basedOn, SetterSpecificity specificity)
182
void UnApplyCore(BindableObject bindable,
Style
basedOn)
197
bool ValidateBasedOn(
Style
value)
StyleableElement\StyleableElement.cs (5)
12
BindableProperty.Create(nameof(Style), typeof(
Style
), typeof(StyleableElement), default(
Style
),
13
propertyChanged: (bindable, oldvalue, newvalue) => ((StyleableElement)bindable)._mergedStyle.Style = (
Style
)newvalue);
23
public
Style
? Style
25
get { return (
Style
?)GetValue(StyleProperty); }
VisualElement\VisualElement.cs (4)
1520
else if (value.Key.StartsWith(
Style
.StyleClassPrefix, StringComparison.Ordinal))
1522
var mergedClassStyles = new List<
Style
>(Resources[value.Key] as List<
Style
>);
1523
mergedClassStyles.AddRange(value.Value as List<
Style
>);
Microsoft.Maui.Controls.Build.Tasks (1)
CompiledConverters\BindablePropertyConverter.cs (1)
45
|| parent.XmlType.Name == nameof(
Style
)))
Microsoft.Maui.Controls.Xaml (3)
ApplyPropertiesVisitor.cs (2)
771
else if (value is
Style
)
772
resourceDictionary.Add((
Style
)value);
SimplifyTypeExtensionVisitor.cs (1)
51
static bool IsStyle(XmlType type) => type.Name == nameof(
Style
) && type.NamespaceUri == XamlParser.MauiUri;