summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Tizen/Renderers/ListViewRenderer.cs
diff options
context:
space:
mode:
authorKangho Hur <kangho.hur@samsung.com>2017-04-25 10:41:28 +0000
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>2017-04-25 10:41:28 +0000
commit35bd510810badc0628ca3850b4347d6725375fdb (patch)
treeeb178dc233e8ad101f85b1df27bb1af7ac4cf126 /Xamarin.Forms.Platform.Tizen/Renderers/ListViewRenderer.cs
parent945d90388fc499ec34d6d2066e7981fa78ec4c4c (diff)
parent9104f5326245cb7afcff443842ad7dee9c9fe049 (diff)
downloadxamarin-forms-35bd510810badc0628ca3850b4347d6725375fdb.tar.gz
xamarin-forms-35bd510810badc0628ca3850b4347d6725375fdb.tar.bz2
xamarin-forms-35bd510810badc0628ca3850b4347d6725375fdb.zip
Merge "Update header/footer in response to HeaderElement/FooterElement notifications" into tizen
Diffstat (limited to 'Xamarin.Forms.Platform.Tizen/Renderers/ListViewRenderer.cs')
-rw-r--r--Xamarin.Forms.Platform.Tizen/Renderers/ListViewRenderer.cs44
1 files changed, 4 insertions, 40 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/ListViewRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/ListViewRenderer.cs
index d2b325af..fff21794 100644
--- a/Xamarin.Forms.Platform.Tizen/Renderers/ListViewRenderer.cs
+++ b/Xamarin.Forms.Platform.Tizen/Renderers/ListViewRenderer.cs
@@ -59,12 +59,10 @@ namespace Xamarin.Forms.Platform.Tizen
RegisterPropertyHandler(ListView.IsGroupingEnabledProperty, UpdateIsGroupingEnabled);
RegisterPropertyHandler(ListView.HasUnevenRowsProperty, UpdateHasUnevenRows);
RegisterPropertyHandler(ListView.RowHeightProperty, UpdateRowHeight);
- RegisterPropertyHandler(ListView.HeaderProperty, UpdateHeader);
RegisterPropertyHandler(ListView.SelectedItemProperty, UpdateSelectedItem);
- RegisterPropertyHandler(ListView.FooterProperty, UpdateFooter);
RegisterPropertyHandler(ListView.ItemsSourceProperty, UpdateSource);
- RegisterPropertyHandler(ListView.FooterTemplateProperty, UpdateFooter);
- RegisterPropertyHandler(ListView.HeaderTemplateProperty, UpdateHeader);
+ RegisterPropertyHandler("HeaderElement", UpdateHeader);
+ RegisterPropertyHandler("FooterElement", UpdateFooter);
}
/// <summary>
@@ -327,24 +325,7 @@ namespace Xamarin.Forms.Platform.Tizen
/// </summary>
void UpdateHeader()
{
- if (Element.Header == null)
- {
- Control.SetHeader(null);
- return;
- }
-
- if (((IListViewController)Element).HeaderElement == null)
- {
- Device.StartTimer(new TimeSpan(0), () =>
- {
- Control.SetHeader(((IListViewController)Element).HeaderElement as VisualElement);
- return false;
- });
- }
- else
- {
- Control.SetHeader(((IListViewController)Element).HeaderElement as VisualElement);
- }
+ Control.SetHeader(((IListViewController)Element).HeaderElement as VisualElement);
}
/// <summary>
@@ -352,24 +333,7 @@ namespace Xamarin.Forms.Platform.Tizen
/// </summary>
void UpdateFooter()
{
- if (Element.Footer == null)
- {
- Control.SetFooter(null);
- return;
- }
-
- if (((IListViewController)Element).FooterElement == null)
- {
- Device.StartTimer(new TimeSpan(0), () =>
- {
- Control.SetFooter(((IListViewController)Element).FooterElement as VisualElement);
- return false;
- });
- }
- else
- {
- Control.SetFooter(((IListViewController)Element).FooterElement as VisualElement);
- }
+ Control.SetFooter(((IListViewController)Element).FooterElement as VisualElement);
}
/// <summary>