Skip to content

Commit 4a66cbd

Browse files
committed
Updated the HeaderedTextBlock Forms nuspec tags to be similar to the native one.
Updated the Android and Windows HeaderedTextBlock control to have accessors to the view's controls to match across all platforms. Removed the UWP specific component from the Networking library.
1 parent 2e93eec commit 4a66cbd

4 files changed

Lines changed: 31 additions & 38 deletions

File tree

MADE.App.Networking/MADE.App.Networking.csproj

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;uap10.0.16299</TargetFrameworks>
4+
<TargetFramework>netstandard2.0</TargetFramework>
55
</PropertyGroup>
66

77
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
@@ -52,18 +52,11 @@
5252
</ItemGroup>
5353

5454
<ItemGroup>
55-
<PackageReference Include="MSBuild.Sdk.Extras" Version="1.5.4" PrivateAssets="All" />
5655
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
5756
</ItemGroup>
5857

59-
<ItemGroup Condition=" '$(TargetFramework)' == 'uap10.0.16299' ">
60-
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.1.5" />
61-
</ItemGroup>
62-
6358
<ItemGroup>
6459
<ProjectReference Include="..\MADE.App\MADE.App.csproj" />
6560
</ItemGroup>
6661

67-
<Import Project="$(MSBuildSDKExtrasTargets)" Condition="Exists('$(MSBuildSDKExtrasTargets)')" />
68-
6962
</Project>

MADE.App.Views.Controls.HeaderedTextBlock.Forms/MADE.App.Views.Controls.HeaderedTextBlock.Forms.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<RepositoryUrl>https://github.com/MADE-Apps/MADE-App-Components</RepositoryUrl>
4444
<RepositoryType>git</RepositoryType>
4545
<PackageIconUrl>https://pbs.twimg.com/profile_images/927154020422160385/6HSRU36P_400x400.jpg</PackageIconUrl>
46-
<PackageTags>MADE App Development HeaderedTextBlock Xamarin.Forms View Custom Controls Windows Android iOS Xamarin</PackageTags>
46+
<PackageTags>MADE App Development Controls View Header TextBlock TextView Xamarin.Forms Windows Android iOS Xamarin</PackageTags>
4747
<RootNamespace>MADE.App.Views</RootNamespace>
4848
</PropertyGroup>
4949

MADE.App.Views.Controls.HeaderedTextBlock/HeaderedTextBlock.Android.cs

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -116,32 +116,32 @@ public HeaderedTextBlock(Context context, IAttributeSet attrs, int defStyleAttr,
116116
/// <summary>
117117
/// Gets the UI element associated with the container for the header and text content.
118118
/// </summary>
119-
public LinearLayout LayoutContainer { get; private set; }
119+
public LinearLayout HeaderTextBlockContainer { get; private set; }
120120

121121
/// <summary>
122122
/// Gets the UI element associated with the header text.
123123
/// </summary>
124-
public TextView HeaderTextView { get; private set; }
124+
public TextView HeaderContent { get; private set; }
125125

126126
/// <summary>
127127
/// Gets the UI element associated with the content text.
128128
/// </summary>
129-
public TextView ContentTextView { get; private set; }
129+
public TextView TextContent { get; private set; }
130130

131131
/// <summary>
132132
/// Gets or sets the string associated with the header.
133133
/// </summary>
134134
public string Header
135135
{
136-
get => this.HeaderTextView?.Text;
136+
get => this.HeaderContent?.Text;
137137
set
138138
{
139-
if (this.HeaderTextView == null || value == this.HeaderTextView.Text)
139+
if (this.HeaderContent == null || value == this.HeaderContent.Text)
140140
{
141141
return;
142142
}
143143

144-
this.HeaderTextView.Text = value;
144+
this.HeaderContent.Text = value;
145145
this.RaisePropertyChanged();
146146
this.UpdateVisibility();
147147
}
@@ -152,15 +152,15 @@ public string Header
152152
/// </summary>
153153
public string Text
154154
{
155-
get => this.ContentTextView?.Text;
155+
get => this.TextContent?.Text;
156156
set
157157
{
158-
if (this.ContentTextView == null || value == this.ContentTextView.Text)
158+
if (this.TextContent == null || value == this.TextContent.Text)
159159
{
160160
return;
161161
}
162162

163-
this.ContentTextView.Text = value;
163+
this.TextContent.Text = value;
164164
this.RaisePropertyChanged();
165165
this.UpdateVisibility();
166166
}
@@ -208,13 +208,13 @@ public override void OnApplyTemplate(IAttributeSet attrs, int defStyleAttr, int
208208
{
209209
base.OnApplyTemplate(attrs, defStyleAttr, defStyleRes);
210210

211-
this.LayoutContainer = this.View?.FindViewById<LinearLayout>(
211+
this.HeaderTextBlockContainer = this.View?.FindViewById<LinearLayout>(
212212
Controls.HeaderedTextBlock.Resource.Id.HeaderedTextBlock_LayoutContainer);
213213

214-
this.HeaderTextView = this.View?.FindViewById<TextView>(
214+
this.HeaderContent = this.View?.FindViewById<TextView>(
215215
Controls.HeaderedTextBlock.Resource.Id.HeaderedTextBlock_HeaderTextView);
216216

217-
this.ContentTextView = this.View?.FindViewById<TextView>(
217+
this.TextContent = this.View?.FindViewById<TextView>(
218218
Controls.HeaderedTextBlock.Resource.Id.HeaderedTextBlock_ContentTextView);
219219

220220
if (attrs != null)
@@ -229,18 +229,18 @@ public override void OnApplyTemplate(IAttributeSet attrs, int defStyleAttr, int
229229
Controls.HeaderedTextBlock.Resource.Styleable.HeaderedTextBlock_hide_if_empty,
230230
false);
231231

232-
if (this.HeaderTextView != null)
232+
if (this.HeaderContent != null)
233233
{
234234
string header = typedArray.GetString(
235235
Controls.HeaderedTextBlock.Resource.Styleable.HeaderedTextBlock_header);
236-
this.HeaderTextView.Text = header;
236+
this.HeaderContent.Text = header;
237237
}
238238

239-
if (this.ContentTextView != null)
239+
if (this.TextContent != null)
240240
{
241241
string text = typedArray.GetString(
242242
Controls.HeaderedTextBlock.Resource.Styleable.HeaderedTextBlock_text);
243-
this.ContentTextView.Text = text;
243+
this.TextContent.Text = text;
244244
}
245245
}
246246

@@ -253,7 +253,7 @@ public override void OnApplyTemplate(IAttributeSet attrs, int defStyleAttr, int
253253
/// </summary>
254254
public void UpdateOrientation()
255255
{
256-
this.LayoutContainer?.SetOrientation(this.Orientation);
256+
this.HeaderTextBlockContainer?.SetOrientation(this.Orientation);
257257
}
258258

259259
/// <summary>
@@ -264,14 +264,14 @@ public void UpdateVisibility()
264264
if (!this.HideIfNullOrWhiteSpace || !string.IsNullOrWhiteSpace(this.Text))
265265
{
266266
this.IsVisible = true;
267-
this.HeaderTextView?.SetVisible(!string.IsNullOrWhiteSpace(this.Header));
268-
this.ContentTextView?.SetVisible(!string.IsNullOrWhiteSpace(this.Text));
267+
this.HeaderContent?.SetVisible(!string.IsNullOrWhiteSpace(this.Header));
268+
this.TextContent?.SetVisible(!string.IsNullOrWhiteSpace(this.Text));
269269
}
270270
else
271271
{
272272
this.IsVisible = false;
273-
this.HeaderTextView?.SetVisible(false);
274-
this.ContentTextView?.SetVisible(false);
273+
this.HeaderContent?.SetVisible(false);
274+
this.TextContent?.SetVisible(false);
275275
}
276276
}
277277
}

MADE.App.Views.Controls.HeaderedTextBlock/HeaderedTextBlock.Windows.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ public HeaderedTextBlock()
7777
this.DefaultStyleKey = typeof(HeaderedTextBlock);
7878
}
7979

80-
public TextBlock HeaderTextBlock { get; private set; }
80+
public TextBlock HeaderContent { get; private set; }
8181

82-
public TextBlock ContentTextBlock { get; private set; }
82+
public TextBlock TextContent { get; private set; }
8383

8484
/// <summary>
8585
/// Gets or sets a value indicating whether to hide the control if the <see cref="IHeaderedTextBlock.Text"/> is null or whitespace.
@@ -159,14 +159,14 @@ public void UpdateVisibility()
159159
if (!this.HideIfNullOrWhiteSpace || !string.IsNullOrWhiteSpace(this.Text))
160160
{
161161
this.IsVisible = true;
162-
this.HeaderTextBlock?.SetVisible(!string.IsNullOrWhiteSpace(this.Header));
163-
this.ContentTextBlock?.SetVisible(!string.IsNullOrWhiteSpace(this.Text));
162+
this.HeaderContent?.SetVisible(!string.IsNullOrWhiteSpace(this.Header));
163+
this.TextContent?.SetVisible(!string.IsNullOrWhiteSpace(this.Text));
164164
}
165165
else
166166
{
167167
this.IsVisible = false;
168-
this.HeaderTextBlock?.SetVisible(false);
169-
this.ContentTextBlock?.SetVisible(false);
168+
this.HeaderContent?.SetVisible(false);
169+
this.TextContent?.SetVisible(false);
170170
}
171171
}
172172

@@ -177,8 +177,8 @@ protected override void OnApplyTemplate()
177177
{
178178
base.OnApplyTemplate();
179179

180-
this.HeaderTextBlock = this.GetChildView<TextBlock>("HeaderContent");
181-
this.ContentTextBlock = this.GetChildView<TextBlock>("TextContent");
180+
this.HeaderContent = this.GetChildView<TextBlock>("HeaderContent");
181+
this.TextContent = this.GetChildView<TextBlock>("TextContent");
182182

183183
this.UpdateVisibility();
184184
this.UpdateOrientation();

0 commit comments

Comments
 (0)