﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - Crosslight - unable to get my Custom View cell to appear on Navigation View Controller</title><link>http://www.intersoftsolutions.com/Community/Crosslight/unable-to-get-my-Custom-View-cell-to-appear-on-Navigation-View-Controller/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>unable to get my Custom View cell to appear on Navigation View Controller</title><link>http://www.intersoftsolutions.com/Community/Crosslight/unable-to-get-my-Custom-View-cell-to-appear-on-Navigation-View-Controller/</link><pubDate>Mon, 16 Jun 2014 04:49:03 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="color: #1f497d;"&gt;double post&lt;/span&gt;&lt;/p&gt;</description></item><item><title>unable to get my Custom View cell to appear on Navigation View Controller</title><link>http://www.intersoftsolutions.com/Community/Crosslight/unable-to-get-my-Custom-View-cell-to-appear-on-Navigation-View-Controller/</link><pubDate>Mon, 16 Jun 2014 04:46:48 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Please find the modified version of DemoTableSource sample project in &lt;a href="https://onedrive.live.com/download?resid=A29317908CEA783A%21401" target="_blank"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;The changes that were made to the original DemoTableSource sample project is as follow&lt;/span&gt;&lt;/p&gt;
&lt;ul style="color: #1f497d;"&gt;&lt;li&gt;In the xib file, please don’t use name which equals to the reference which is available in iOS.&lt;/li&gt;&lt;li&gt;In the original DemoTableSource sample project, the CustomTableSource is initialized in OnInitializeView. You should do that in OnViewInitialized just like the one that is shown in CustomStyleListViewController.cs in DataSamples project.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Hope this helps.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>unable to get my Custom View cell to appear on Navigation View Controller</title><link>http://www.intersoftsolutions.com/Community/Crosslight/unable-to-get-my-Custom-View-cell-to-appear-on-Navigation-View-Controller/</link><pubDate>Fri, 13 Jun 2014 16:40:16 GMT</pubDate><dc:creator>nick5454</dc:creator><description>File 3 of 3. Remove the .txt from the 2 files so you can reattach. I used the zip command in terminal to split them up&lt;br&gt;</description></item><item><title>unable to get my Custom View cell to appear on Navigation View Controller</title><link>http://www.intersoftsolutions.com/Community/Crosslight/unable-to-get-my-Custom-View-cell-to-appear-on-Navigation-View-Controller/</link><pubDate>Fri, 13 Jun 2014 16:38:10 GMT</pubDate><dc:creator>nick5454</dc:creator><description>File 2 of 3&lt;br&gt;</description></item><item><title>unable to get my Custom View cell to appear on Navigation View Controller</title><link>http://www.intersoftsolutions.com/Community/Crosslight/unable-to-get-my-Custom-View-cell-to-appear-on-Navigation-View-Controller/</link><pubDate>Fri, 13 Jun 2014 16:17:38 GMT</pubDate><dc:creator>nick5454</dc:creator><description>&lt;p&gt;File 1 of 3&lt;br&gt;&lt;/p&gt;</description></item><item><title>unable to get my Custom View cell to appear on Navigation View Controller</title><link>http://www.intersoftsolutions.com/Community/Crosslight/unable-to-get-my-Custom-View-cell-to-appear-on-Navigation-View-Controller/</link><pubDate>Wed, 11 Jun 2014 13:39:40 GMT</pubDate><dc:creator>technical@intersoftpt.com</dc:creator><description>&lt;p&gt;Dear Nicholas,&lt;/p&gt;&lt;p&gt;Please make sure you inherit your custom table source from ObservableTableSource as in the data sample. That's because the table source provided by Crosslight already include the required implementation that comply tothe ViewModel pattern.&lt;/p&gt;&lt;p&gt;If you still experience issues, please send over a sample and we're happy to assist you solving the issues.&lt;/p&gt;&lt;p&gt;Thanks!&lt;/p&gt;</description></item><item><title>unable to get my Custom View cell to appear on Navigation View Controller</title><link>http://www.intersoftsolutions.com/Community/Crosslight/unable-to-get-my-Custom-View-cell-to-appear-on-Navigation-View-Controller/</link><pubDate>Wed, 11 Jun 2014 09:18:29 GMT</pubDate><dc:creator>nick5454</dc:creator><description>So I wiped that project and started another with the camera store wizard.&lt;br&gt;&lt;br&gt;The problem I get is this, as shown in the data samples I do a RegisterNavigation and I get an error from the SelectionViewController.&lt;br&gt;&lt;br&gt;If I leave of that attribute on the ViewController it works, but the binding is removed ( new TableSource line is present ).&lt;br&gt;&lt;br&gt;If I remove the new table source line I get the binding to my properties, but I can't change the background to clear color.&lt;br&gt;&lt;br&gt;Why do I lose all binding when I create a custom table source and why is there an error with the Selection View controller when I register my custom control?&lt;br&gt;&lt;br&gt;&lt;br&gt;</description></item><item><title>unable to get my Custom View cell to appear on Navigation View Controller</title><link>http://www.intersoftsolutions.com/Community/Crosslight/unable-to-get-my-Custom-View-cell-to-appear-on-Navigation-View-Controller/</link><pubDate>Tue, 10 Jun 2014 23:50:53 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;blockquote&gt;Another noteworthy point is that if your custom table view cell has different height than the default, you should inherit the Crosslight’s default data source adapter and return the desired height in the GetHeight method of the adapter.&lt;/blockquote&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Source: Customizing Cell Styles on iOS section from &lt;a href="http://developer.intersoftpt.com/display/crosslight/Customizing+Cell+Styles" target="_blank"&gt;Customizing Cell Styles&lt;/a&gt; documentation.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;You may also check the &lt;a href="http://git.intersoftpt.com/projects/CROS/repos/samples/browse/DataSamples/DataSamples.iOS/ViewControllers/CustomStyleListViewController.cs" target="_blank"&gt;CustomStyleListViewController.cs&lt;/a&gt; code on &lt;a href="http://git.intersoftpt.com/projects/CROS/repos/samples/browse/DataSamples/" target="_blank"&gt;DataSamples&lt;/a&gt; sample project which implemennts custom height. Use a custom table source with customized row height in OnViewInitialized (line 48 on CustomStyleListViewController.cs code). And the delegate should derives from ObservableTableSource.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Hope this helps.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>unable to get my Custom View cell to appear on Navigation View Controller</title><link>http://www.intersoftsolutions.com/Community/Crosslight/unable-to-get-my-Custom-View-cell-to-appear-on-Navigation-View-Controller/</link><pubDate>Tue, 10 Jun 2014 14:25:30 GMT</pubDate><dc:creator>nick5454</dc:creator><description>&lt;p&gt;I took the Master-Detail Wizard and I want to display custom view cells on that page. I need to expand the row to 152 pixels and I overrode the GetRowHeight on both the UITableViewController and it's delegate and it never hits that method to get the row height. What am I doing wrong?&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;pre&gt;[Register("MainViewController")]
	[ImportBinding(typeof(NavigationBindingProvider))]
	public class MainViewController : UITableViewController&amp;lt;NavigationViewModel&amp;gt;
    {
        #region Properties

        public override TableViewInteraction InteractionMode
        {
            get { return TableViewInteraction.Navigation; }
        }

		public override float GetHeightForRow (UITableView tableView, NSIndexPath indexPath)
		{
			return 152;
		}

		public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath)
		{
			return base.GetCell (tableView, indexPath);
		}

        public override bool ShowGroupHeader
        {
			get { return false; }
        }

        public override UITableViewStyle TableViewStyle
        {
			get { return UITableViewStyle.Grouped; }
        }

		public override TableViewCellStyle CellStyle
		{
			get
			{
				return TableViewCellStyle.Custom;
			}
		}

		public override UIViewTemplate CellTemplate
		{
			get
			{
				return new UIViewTemplate(BridgeTableViewCell.Nib);
			}
		}

		public override string CellIdentifier
		{
			get
			{
				return "BridgeTableViewCell";
			}
		}
        #endregion

        #region Methods

        protected override void InitializeView()
        {
            base.InitializeView();

            var label = new UILabel();
            label.Text = "Powered by Crosslight&amp;reg;";
            label.BackgroundColor = UIColor.Clear;
            label.TextColor = UIColor.DarkGray;
            label.ShadowColor = UIColor.White.ColorWithAlpha(0.8f);
            label.ShadowOffset = new SizeF(1, 1);
            label.Font = UIFont.SystemFontOfSize(14f);
            //label.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight | UIViewAutoresizing.FlexibleLeftMargin | UIViewAutoresizing.FlexibleRightMargin;
            label.SizeToFit();
            label.Frame = new RectangleF(label.Frame.Left, label.Frame.Top, label.Frame.Width, label.Frame.Height + 8);
            label.Center = new PointF(this.View.Bounds.Width / 2, label.Bounds.Height / 2);

            // set TableView footer
            this.TableView.TableFooterView = label;

            // set navigation title
            this.NavigationItem.Title = "Crosslight App";

			this.Appearance.BackgroundColor = UIColor.Clear;
			this.Appearance.BackgroundImage = "Bridge5.png";
			this.TableView.Delegate = new MainTableDelegate ();
        }

		private class MainTableDelegate : UITableViewDelegate {
			public override float GetHeightForRow (UITableView tableView, NSIndexPath indexPath)
			{
				return 152;
			}
		}
        #endregion
    }
}&lt;/pre&gt;&lt;p&gt;Navigation View Model&lt;/p&gt;&lt;pre&gt;public class NavigationViewModel : SampleListViewModelBase&amp;lt;BridgeNavigationItem&amp;gt;
    {
		private CameraRepository _repository;

        #region Properties

        public string AboutText
        {
            get { return _aboutText; }
            set
            {
                if (_aboutText != value)
                {
                    _aboutText = value;
                    OnPropertyChanged("AboutText");
                }
            }
        }


        private string _aboutText { get; set; }

        #endregion

        #region Constructors

        public NavigationViewModel()
        {
			List&amp;lt;BridgeNavigationItem&amp;gt; items = new List&amp;lt;BridgeNavigationItem&amp;gt;();

			_repository = new CameraRepository ();

			foreach (string item in _repository.GetAll()) {
				items.Add(new BridgeNavigationItem(item, "Piedras N...", typeof(CrossingOwlViewModel)));
			}
			//items.AddRange (_repository.GetAll ());
			//items.Add (new NavigationItem ("Crossing Owls", "Cameras", typeof(CrossingOwlViewModel)));
			//items.Add(new NavigationItem("Simple Page", "About", typeof(SimpleViewModel)));
			//items.Add(new NavigationItem("About This App", "About", typeof(AboutNavigationViewModel)));

			this.SourceItems = items;
            this.RefreshGroupItems();
        }

        #endregion

        #region Methods


        public override void RefreshGroupItems()
        {
            if (this.Items != null)
                this.GroupItems = this.Items.GroupBy(o =&amp;gt; o.Group).Select(o =&amp;gt; new GroupItem&amp;lt;NavigationItem&amp;gt;(o)).ToList();
        }


        #endregion
    }&lt;/pre&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;BridgeNavigationItem&lt;/p&gt;&lt;pre&gt;		public BridgeNavigationItem (string title, NavigationTarget target) : base(title, target)
		{
		}

		public BridgeNavigationItem(string title, string group, NavigationTarget target) : base(title, group, target) {
		}

		public BridgeNavigationItem(string title, string group, Type target) : base(title, group, target) {
		}

		public string BridgeName {
			get {
				return "Hello Bridge";
			}
		}
	}&lt;/pre&gt;&lt;p&gt;NavigationBindingProvider&lt;/p&gt;&lt;pre&gt;    public class NavigationBindingProvider : BindingProvider
    {
        #region Constructors

        public NavigationBindingProvider()
        {
            ItemBindingDescription itemBinding = new ItemBindingDescription()
            {
                DisplayMemberPath = "Title",
                NavigateMemberPath = "Target"
            };

            this.AddBinding("TableView", BindableProperties.ItemsSourceProperty, "Items");
            this.AddBinding("TableView", BindableProperties.ItemTemplateBindingProperty, itemBinding, true);
            this.AddBinding("TableView", BindableProperties.SelectedItemProperty, "SelectedItem", BindingMode.TwoWay);
        }

        #endregion
    }&lt;/pre&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;</description></item></channel></rss>