{"id":2341,"date":"2024-09-09T14:44:09","date_gmt":"2024-09-09T05:44:09","guid":{"rendered":"https:\/\/y42u.net\/tec001\/?p=2341"},"modified":"2024-09-09T22:15:11","modified_gmt":"2024-09-09T13:15:11","slug":"xamrin_maui_cell","status":"publish","type":"post","link":"https:\/\/y42u.net\/tec001\/2024\/09\/09\/xamrin_maui_cell\/","title":{"rendered":"Xamarin\u304b\u3089NetMAUI\u3078\u79fb\u884c\u4e2d(\uff14):ViewCell\u79fb\u690d"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Xamarin\u306e\u6642\u304b\u3089iOS\u306e\u300cSegment\u300d\u306b\u5bfe\u3059\u308bTable\u7528GUI\u90e8\u54c1\u304c\u306a\u304b\u3063\u305f\u306e\u3067\u3001CustamCell\u3092\u4f5c\u6210\u3057\u3066\u5bfe\u5fdc\u3057\u3066\u3044\u305f\u3002NetMAUI\u3067\u306f\u3069\u306e\u69d8\u306b\u5bfe\u5fdc\u3059\u308b\u304b\u3002\u3002\u3002\u306e\u30c9\u30bf\u30d0\u30bf\u5287\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"570\" height=\"261\" src=\"https:\/\/i0.wp.com\/y42u.net\/tec001\/wp-content\/uploads\/2024\/08\/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-2024-08-23-10.24.19.png?resize=570%2C261&#038;ssl=1\" alt=\"\" class=\"wp-image-2345\" srcset=\"https:\/\/i0.wp.com\/y42u.net\/tec001\/wp-content\/uploads\/2024\/08\/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-2024-08-23-10.24.19.png?w=570&amp;ssl=1 570w, https:\/\/i0.wp.com\/y42u.net\/tec001\/wp-content\/uploads\/2024\/08\/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-2024-08-23-10.24.19.png?resize=300%2C137&amp;ssl=1 300w, https:\/\/i0.wp.com\/y42u.net\/tec001\/wp-content\/uploads\/2024\/08\/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-2024-08-23-10.24.19.png?resize=40%2C18&amp;ssl=1 40w\" sizes=\"(max-width: 570px) 100vw, 570px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\uff11\uff09\u8a2d\u5b9a\u753b\u9762\u306e\u79fb\u690d\uff1aCustomCell\u4f5c\u6210<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Xamarin\u3067\u306e\u753b\u9762\u306fTable\u306bEntryCell\/TextCell\/SwitchCell\u3068CustomCell\u306eCellSegment3~5\u3092\u4f7f\u7528\u3057\u3066\u4f5c\u6210\u3057\u3066\u3044\u307e\u3057\u305f\u3002NetMAUI\u3078\u306e\u79fb\u884c\u3092\u540c\u69d8\u306b\u3059\u308b\u305f\u3081\u306bCustomCell\u3092\u4f5c\u6210\u3059\u308b\u4e8b\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\uff11\u22121\uff09\u5358\u7d14\u306aCell\u306e\u69cb\u9020\u5909\u66f4<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u524d\u306fCustomCell\u306f\u5171\u901a\u90e8\u5206(A)\u3068iOS\u90e8\u5206(B)=Layout\u3092iOS\u306eLayoutSuview\u3067\u4f5c\u6210\u3057\u3066\u3044\u307e\u3057\u305f.\u3002\u304c\u3001\u8003\u3048\u3066\u307f\u308c\u3070xaml\u3068\u540c\u3058\u4e8b\u304cc# \u3067\u305d\u306e\u307e\u307e\u66f8\u3051\u308b\u306e\u3067iOS\u7279\u6709\u306eSegment\u3092\u4f7f\u308f\u306a\u3044\u306a\u3089\u3070iOS\u90e8\u5206\u306f\u4e0d\u8981\u306a\u306e\u3067\u5927\u90e8\u5206\u3092\u5171\u901a\u90e8\u5206(A)\u3068\u3057\u3066\u4f5c\u6210\u3059\u308b\u4e8b\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0b\u306b\u30b3\u30fc\u30c9\u4f8b\u3092\u8f09\u305b\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>Xamarin\u7248\u306e\u5834\u5408<\/strong>\uff1a\n\uff1c\u5171\u901a\u90e8\u5206\u4f8b\uff1e\n    public class <strong>MarkCellBase<\/strong> : <strong>ViewCell<\/strong>\n    {\n        public int tagNo;\n        public string&#91;] dat;\n        public string CellName;\n        \/\/\n        public readonly BindableProperty _titleLabel =\n            BindableProperty.Create(\"TitleLabel\", typeof(string), \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000typeof(MarkCellBase), \"\");\n        public string TitleLabel\n        {\n            get { return (string)GetValue(_titleLabel); }\n            set { SetValue(_titleLabel, value); }\n        }\n\n        public MarkCellBase() : base()\n        {\n        }\n        \/\/\n        \/\/ \u4fdd\u5b58\u7528\u30c7\u30fc\u30bf\u30ea\u30b9\u30c8\u623b\u3057\n        public virtual (int, List&lt;string>) getAttr()\n        {\n            return (0, null);\n        }\n        \/\/ \u4fdd\u5b58\u7528\u30c7\u30fc\u30bf\u30ea\u30b9\u30c8\u8a2d\u5b9a\n        public virtual void \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000setAttr(System.Collections.Generic.List&lt;string> tlist)\n        {\n        }\n        public virtual void UpdateCell()\n        {\n        }\n        \/\/\n        protected bool SetProperty&lt;T>(ref T backingStore, T value,\n        &#91;CallerMemberName] string propertyName = \"\",\n        Action onChanged = null)\n        {\n            if (EqualityComparer&lt;T>.Default.Equals(backingStore, value))\n                return false;\n\n            backingStore = value;\n            onChanged?.Invoke();\n            OnPropertyChanged(propertyName);\n            return true;\n        }\n    }\n\n    public class <strong>CellText<\/strong> : <strong>MarkCellBase<\/strong>\n    {\n        public string Placeholder0;\n        \/\/\n        public CellText() : base()\n        {\n            CellName = \"CText\";\n        }\n        public static readonly BindableProperty _text0 =\n            BindableProperty.Create(\"Text0\", typeof(string), \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000typeof(CellText), \"\");\n        public string Text0\n        {\n            get { return (string)GetValue(_text0); }\n            set { SetValue(_text0, value); }\n        }\n        \/\/\n        public override void UpdateCell()\n        {\n            \/\/tagNo = this.Tag;\n            \/\/\n            TitleLabel = dat&#91;2];\n            \/\/label0.Tag = 0;\n            Placeholder0 = dat&#91;3];\n            \/\/text0.Tag = 1;\n            Log.Instance.Debug($\"CText:UpdateCell={TitleLabel}\");\n        }\n        \/\/ \u4fdd\u5b58\u7528\u30c7\u30fc\u30bf\u30ea\u30b9\u30c8\u623b\u3057\n        public override (int, List&lt;string>) getAttr()\n        {\n            List&lt;string> tlist = new List&lt;string>\n            {\n                Text0\n            };\n            if (Text0?.Length>0)\n                return (1,tlist);   \/\/\u4fee\u6b63\u3042\u308a\n            else\n                return (0, tlist);  \/\/\u4fee\u6b63\u306a\u3057\n        }\n        \/\/ \u4fdd\u5b58\u7528\u30c7\u30fc\u30bf\u30ea\u30b9\u30c8\u8a2d\u5b9a\n        public override void setAttr(List&lt;string> tlist)\n        {\n            Text0 = tlist&#91;0];\n        }\n    }\n\n\uff1ciOS\u56fa\u6709\u90e8\u5206\u4f8b\uff1e\n    public class <strong>MarkTableAddIosCellClass<\/strong> : <strong>UITableViewCell<\/strong>, \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000INativeElementView\n    {\n        public UILabel TitleLabel { get; set; }\n        public virtual Cell Cell { get; set; }\n        \/\/\n        public Element Element => Cell;\n\n        public MarkTableAddIosCellClass()\n        {\n        }\n        public MarkTableAddIosCellClass(UITableViewCellStyle Default,\n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000 string cellId) : base(Default, cellId)\n        { }\n    }\n\n   internal class <strong>IosCellText<\/strong> : <strong>MarkTableAddIosCellClass<\/strong>\n    {\n        public UITextField Text0 { get; set; }\n        \/\/\n        public void init()\n        {\n\n            BackgroundColor = UIColor.SystemGray6;\n            \/\/\n            SelectionStyle = UITableViewCellSelectionStyle.Gray;\n\n            TitleLabel = new UILabel()\n            {\n                BackgroundColor = UIColor.Clear\n            };\n            Text0 = new UITextField()\n            {\n                BackgroundColor = UIColor.SystemGray4\n            };\n            \/\/\n            ContentView.Add(TitleLabel);\n            ContentView.Add(Text0);\n            \/\/\n            UpdateCell((CellText)Cell);\n            \/\/\n            \/\/\u9078\u629e\u304c\u5909\u308f\u3063\u305f\u3089\u3001Form\u306eCell\u30c7\u30fc\u30bf\u3092\u66f4\u65b0\u3059\u308b\n            Text0.AddTarget((sender, e) =>\n            {\n                (Cell as CellText).Text0 = Text0.Text;\n            }, UIControlEvent.EditingChanged);\n        }\n        public IosCellText(string cellId, CellText cell) : \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000base(UITableViewCellStyle.Default, cellId)\n        {\n            this.Cell = cell;\n            init();\n        }\n\n        public IosCellText(Cell item)\n        {\n            this.Cell = (CellText)item;\n            init();\n        }\n        public IosCellText()\n        {\n            this.Cell = null;\n        }\n\n        public void UpdateCell(CellText cell)\n        {\n            this.Cell = cell;\n            CellText lcell = (CellText)Cell;\n            TitleLabel.Text = lcell.TitleLabel;\n            Text0.Text = lcell.Text0;\n            \/\/\n            Text0.Placeholder = lcell.Placeholder0;\n            \/\/\n            Text0.Tag = 0;\n        }\n\n        public override void LayoutSubviews()\n        {\n            base.LayoutSubviews();\n            \/\/\n            if (TitleLabel == null)\n                return;\n            TitleLabel.Frame = new CGRect(15, 5, \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000ContentView.Bounds.Width - 30, 25);\n            Text0.Frame = new CGRect(15, 30, \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000ContentView.Bounds.Width - 30, 25);\n        }\n        \/\/\n        protected override void Dispose(bool disposing)\n        {\n            if (disposing)\n            {\n                TitleLabel.Dispose();\n                Text0.Dispose();\n                Cell = null;\n            }\n            base.Dispose(disposing);\n        }\n    }\n\n    public class <strong>IosCellTextRenderer<\/strong> : <strong>ViewCellRenderer<\/strong>\n    {\n        public override UIKit.UITableViewCell \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000GetCell(Cell item, UIKit.UITableViewCell reusableCell, \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000UIKit.UITableView tv)\n        {\n            var cellText = reusableCell as IosCellText;\n            if (cellText == null)\n            {\n                \/\/\u30ea\u30b5\u30a4\u30af\u30eb\u3067\u306a\u3051\u308c\u3070\u30bb\u30eb\u3092\u751f\u6210\u3059\u308b\n                cellText = new IosCellText(item);\n            }\n            else\n            {\n                \/\/\u30bb\u30eb\u5185\u5bb9\u306e\u66f4\u65b0\n                cellText.UpdateCell((CellText)item);\n            }\n            return cellText;\n        }\n    }<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u69cb\u9020\u3092\u5909\u3048\u305f\u4e8b\u3067\u3001iOS\u56fa\u6709\u306eViewCellRenderer\u304c\u4e0d\u8981\u306b\u306a\u308a\u968f\u5206\u3059\u3063\u304d\u308a\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>NetMAUI\u306e\u69cb\u9020\u5909\u66f4\u7248<\/strong>\uff1a\u6a5f\u80fd\u304c\u5168\u304f\u540c\u3058\u3067\u306f\u7121\u3044\u306e\u3067\u69cb\u9020\u306e\u53c2\u8003\u3068\u3057\u3066\u898b\u3066\u4e0b\u3055\u3044\n&lt;\u5171\u901a\u90e8\u5206\u4f8b>\n    public class <strong>MarkCellBase<\/strong> : <strong>ViewCell<\/strong>\n    {\n        public Label _titleLabel = new Label { Text = \"TitleLabel\", \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000Padding = new Thickness(20, 0, 0, 0) };\n        \/\/\n        public int tagNo;\n        public string&#91;] dat;\n        public string CellName;\n        \/\/\n        public readonly BindableProperty TitleLabelProperty =\n            BindableProperty.Create(\"TitleLabel\", typeof(string), \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000typeof(MarkCellBase),   default(string));\n\n        public string TitleLabel\n        {\n            get { return (string)GetValue(TitleLabelProperty); }\n            set { SetValue(TitleLabelProperty, value); }\n        }\n\n        public MarkCellBase() : base()\n        {\n            \/\/\u3053\u3053\u3067\u306f\u4f55\u3082\u3057\u306a\u3044\n        }\n        \/\/\n        \/\/ \u4fdd\u5b58\u7528\u30c7\u30fc\u30bf\u30ea\u30b9\u30c8\u623b\u3057\n        public virtual (int, List&lt;string>) getAttr()\n        {\n            return (0, null);\n        }\n        \/\/ \u4fdd\u5b58\u7528\u30c7\u30fc\u30bf\u30ea\u30b9\u30c8\u8a2d\u5b9a\n        public virtual void \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000setAttr(System.Collections.Generic.List&lt;string> tlist)\n        {\n        }\n        public virtual void UpdateCell()\n        {\n        }\n        \/\/\n        protected bool SetProperty&lt;T>(ref T backingStore, T value,\n        &#91;CallerMemberName] string propertyName = \"\",\n        Action? onChanged = null)\n        {\n            if (EqualityComparer&lt;T>.Default.Equals(backingStore, value))\n                return false;\n\n            backingStore = value;\n            onChanged?.Invoke();\n            OnPropertyChanged(propertyName);\n            return true;\n        }\n    }\n\n    public class <strong>CellText<\/strong> : <strong>MarkCellBase<\/strong>\n    {\n        public string Placeholder0;\n        public Entry _entry0 = new Entry { Text = \"Entry0\" };\n        \/\/\n        public CellText() : base()\n        {\n            CellName = \"CText\";\n            var stk = new StackLayout();\n            stk.Orientation = StackOrientation.Horizontal;\n            stk.Add(_Lable);\n            stk.Add(_entry0);\n            View = stk;\n            \/\/\n            Appearing += OnAppearing;\n        }\n        private void OnAppearing(object sender, EventArgs e)\n        {\n            Console.WriteLine(\"CellText\");\n            _Lable.Text = TitleLabel;\n            _entry0.Text = Text0;\n            \/\/\n        }\n        public static readonly BindableProperty _text0 =\n            BindableProperty.Create(\"Text0\", typeof(string), \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000typeof(CellText), \"\");\n        public string Text0\n        {\n            get { return (string)GetValue(_text0); }\n            set { SetValue(_text0, value); }\n        }\n        public override void UpdateCell()\n        {\n            \/\/\n            TitleLabel = dat&#91;2];\n            Placeholder0 = dat&#91;3];\n            Log.Debug($\"CText:UpdateCell={TitleLabel}\");\n        }\n        \/\/ \u4fdd\u5b58\u7528\u30c7\u30fc\u30bf\u30ea\u30b9\u30c8\u623b\u3057\n        public override (int, List&lt;string>) getAttr()\n        {\n            List&lt;string> tlist = new List&lt;string>\n            {\n                Text0\n            };\n            if (Text0?.Length>0)\n                return (1,tlist);   \/\/\u4fee\u6b63\u3042\u308a\n            else\n                return (0, tlist);  \/\/\u4fee\u6b63\u306a\u3057\n        }\n        \/\/ \u4fdd\u5b58\u7528\u30c7\u30fc\u30bf\u30ea\u30b9\u30c8\u8a2d\u5b9a\n        public override void setAttr(List&lt;string> tlist)\n        {\n            Text0 = tlist&#91;0];\n        }\n    }\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\uff11\u22122\uff09SegmentCell\u306e\u79fb\u690d<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">iOS\u306eUISegmentedControl\u3092\u4f7f\u3046\u305f\u3081\u306bCustomCell\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u5fc5\u8981\u306a\u6570\u306eButton\u3092\u914d\u7f6e\u3057\u3066\u3001\u9078\u629e\u72b6\u614b\u3092\u81ea\u5206\u3067\u7ba1\u7406\u3059\u308b\u306a\u3089\u3070\u5171\u901a\u90e8\u5206\u306e\u307f\u3067\u5b9f\u73fe\u3067\u304d\u308b\u3068\u8003\u3048\u3066\u4ee5\u4e0b\u306e\u69d8\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Xamarin\u7248\u306e\u5834\u5408\uff1a\n\uff1c\u5171\u901a\u90e8\u5206\u4f8b\uff1e\n    public class <strong>MarkCellBase<\/strong> : <strong>ViewCell<\/strong>\n    {\n\u3000\u3000\u3000\u3000\u3000\u3002\u3002\u3002\u3002\u3002\u3002\n    }\n\n   public class <strong>CellSegment2<\/strong> : <strong>MarkCellBase<\/strong>\n    {\n        \/\/\n        public CellSegment2() : base()\n        {\n            CellName = \"CSeg2\";\n        }\n        \/\/\n        public static readonly BindableProperty _selectedSegment =\n            BindableProperty.Create(\"SelectedSegment\", typeof(int), \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000typeof(CellSegment2), 0);\n        public int SelectedSegment\n        {\n            get { return (int)GetValue(_selectedSegment); }\n            set { SetValue(_selectedSegment, value); }\n        }\n        \/\/\n        public static readonly BindableProperty _text0 =\n            BindableProperty.Create(\"Text0\", typeof(string), \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000typeof(CellSegment2), \"\");\n        public string Text0\n        {\n            get { return (string)GetValue(_text0); }\n            set { SetValue(_text0, value); }\n        }\n        public static readonly BindableProperty _text1 =\n            BindableProperty.Create(\"Text1\", typeof(string), \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000typeof(CellSegment2), \"\");\n        public string Text1\n        {\n            get { return (string)GetValue(_text1); }\n            set { SetValue(_text1, value); }\n        }\n        public override void UpdateCell()\n        {\n            TitleLabel = dat&#91;2];\n            Text0 = dat&#91;3];\n            Text1 = dat&#91;4];\n            Log.Instance.Debug($\"CSeg2:UpdateCell={TitleLabel}\");\n        }\n        \/\/ \u4fdd\u5b58\u7528\u30c7\u30fc\u30bf\u30ea\u30b9\u30c8\u623b\u3057\n        public override (int, List&lt;string>) getAttr()\n        {\n            string title = \"\";\n            if (SelectedSegment == 0)\n                title = Text0;\n            else if (SelectedSegment == 1)\n                title = Text1;\n            \/\/\n            List&lt;string> tlist = new List&lt;string>\n            {\n\t\t$\"{SelectedSegment}\",\n                title\n            };\n            if (SelectedSegment > 0)\n                return (1, tlist);   \/\/\u4fee\u6b63\u3042\u308a\n            else\n                return (0, tlist);  \/\/\u4fee\u6b63\u306a\u3057\n        }\n        \/\/ \u4fdd\u5b58\u7528\u30c7\u30fc\u30bf\u30ea\u30b9\u30c8\u8a2d\u5b9a\n        public override void setAttr(List&lt;string> tlist)\n        {\n            SelectedSegment = int.Parse(tlist&#91;0]);\n        }\n    }\n\n\uff1ciOS\u56fa\u6709\u90e8\u5206\u4f8b\uff1e\n    public class <strong>MarkTableAddIosCellClass<\/strong> : <strong>UITableViewCell<\/strong>, \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000INativeElementView\n    {\n\u3000\u3000\u3000\u3000\u3000\u3000\u3002\u3002\u3002\u3002\n    }\n\n   internal class <strong>IosCellSegment2<\/strong> : <strong>MarkTableAddIosCellClass<\/strong>\n    {\n        public UISegmentedControl Segment0 { get; set; }\n        \/\/\n        public void init()\n        {\n            Cell.PropertyChanged += CellPropertyChanged;\n            BackgroundColor = UIColor.SystemGray6;\n            \/\/\n            SelectionStyle = UITableViewCellSelectionStyle.Gray;\n            \/\/ContentView.BackgroundColor = \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000UIColor.FromRGB(255, 255, 224);\n            TitleLabel = new UILabel()\n            {\n                BackgroundColor = UIColor.Clear\n            };\n            CellSegment2 lcell = (CellSegment2)Cell;\n            Segment0 = new UISegmentedControl()\n            {\n                SelectedSegment = lcell.SelectedSegment,\n                Tag = 1,\n                BackgroundColor = UIColor.Clear\n            };\n            \/\/\n            ContentView.Add(TitleLabel);\n            ContentView.Add(Segment0);\n            \/\/\n            UpdateCell(lcell);\n            \/\/\u9078\u629e\u304c\u5909\u308f\u3063\u305f\u3089\u3001Form\u306eCell\u30c7\u30fc\u30bf\u3092\u66f4\u65b0\u3059\u308b\n            Segment0.ValueChanged += (s, a) => {\n                var index = Segment0.SelectedSegment;\n                lcell.SelectedSegment = (int) index;\n            };\n        }\n\n        public IosCellSegment2(string cellId, CellSegment2 cell) : \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000base(UITableViewCellStyle.Default, cellId)\n        {\n            this.Cell = cell;\n            init();\n        }\n        public IosCellSegment2(Cell item)\n        {\n            this.Cell = (CellSegment2)item;\n            init();\n        }\n        public IosCellSegment2()\n        {\n            this.Cell = null;\n        }\n        public void UpdateCell(CellSegment2 cell)\n        {\n            this.Cell = cell;\n            TitleLabel.Text = cell.TitleLabel;\n            Segment0.RemoveAllSegments();\n            Segment0.InsertSegment(cell.Text0, 0, false);\n            Segment0.InsertSegment(cell.Text1, 1, false);\n            Segment0.SelectedSegment = cell.SelectedSegment;\n        }\n        public override void LayoutSubviews()\n        {\n            base.LayoutSubviews();\n            \/\/\n            if (TitleLabel == null)\n                return;\n            TitleLabel.Frame = new CGRect(15, 5, \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000ContentView.Bounds.Width - 30, 25);\n            Segment0.Frame = new CGRect(15, 30, \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000ContentView.Bounds.Width - 30, 25);\n        }\n        \/\/ProperyChanged\u5bfe\u5fdc\n        public void CellPropertyChanged(object sender, \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000PropertyChangedEventArgs e)\n        {\n            CellSegment2 lcell = (CellSegment2)Cell;\n            if (e.PropertyName == \"TitleLabel\")\n            {\n                TitleLabel.Text = lcell.TitleLabel;\n            }\n            else if (e.PropertyName == \"Segment0\")\n            {\n                Segment0.SelectedSegment = lcell.SelectedSegment;\n            }\n        }\n        \/\/\n        protected override void Dispose(bool disposing)\n        {\n            if (disposing)\n            {\n                TitleLabel.Dispose();\n                Segment0.Dispose();\n                Cell.PropertyChanged -= CellPropertyChanged;\n                Cell = null;\n            }\n            base.Dispose(disposing);\n        }\n    }\n\n    public class <strong>IosCellSegment2Renderer<\/strong> : <strong>ViewCellRenderer<\/strong> \n    {\n        public override UIKit.UITableViewCell GetCell(Cell item, \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000UIKit.UITableViewCell reusableCell, \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000UIKit.UITableView tv)\n        {\n            var cellSegment2 = reusableCell as IosCellSegment2;\n            if (cellSegment2 == null)\n            {\n                \/\/\u30ea\u30b5\u30a4\u30af\u30eb\u3067\u306a\u3051\u308c\u3070\u30bb\u30eb\u3092\u751f\u6210\u3059\u308b\n                cellSegment2 = new IosCellSegment2(item);\n            }\n            else\n            {\n                \/\/\u30ea\u30b5\u30a4\u30af\u30eb\u524d\u306eFormsCell\u306ePropertyChanged\u3092\u89e3\u9664\u3059\u308b\n                cellSegment2.Cell.PropertyChanged -= \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000cellSegment2.CellPropertyChanged;\n                \/\/\u30bb\u30eb\u5185\u5bb9\u306e\u66f4\u65b0\n                cellSegment2.UpdateCell((CellSegment2)item);\n            }\n            \/\/\u30ea\u30b5\u30a4\u30af\u30eb\u5f8c\u306eFormsCell\u306ePropertyChanged\u3092\u8cfc\u8aad\u3059\u308b\n            item.PropertyChanged += cellSegment2.CellPropertyChanged;\n            return cellSegment2;\n        }\n    }<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u69cb\u9020\u3092\u5909\u3048\u305f\u4e8b\u3067\u3001iOS\u56fa\u6709\u306eViewCellRenderer\u304c\u4e0d\u8981\u306b\u306a\u308a\u968f\u5206\u3059\u3063\u304d\u308a\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>NetMAUI\u306e\u69cb\u9020\u5909\u66f4\u7248\uff1a\u6a5f\u80fd\u304c\u5168\u304f\u540c\u3058\u3067\u306f\u7121\u3044\u306e\u3067\u69cb\u9020\u306e\u53c2\u8003\u3068\u3057\u3066\u898b\u3066\u4e0b\u3055\u3044\n&lt;\u5171\u901a\u90e8\u5206\u4f8b>\n    public class MarkCellBase : ViewCell  \n  \u3000{\u3000\u3000\n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3002\u3002\u3002\u3002\u3002\u3002    \n\u3000\u3000}\n    public class <strong>CellSegment2<\/strong> : <strong>MarkCellBase<\/strong>\n    {\n        public Button _button0 = new Button { Text = \"Text0\", \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000Padding = new Thickness(20, 0, 0, 0) };\n        public Button _button1 = new Button { Text = \"Text1\" };\n        \/\/\n        public CellSegment2() : base()\n        {\n            CellName = \"CSeg2\";\n            var stkV = new StackLayout();\n            stkV.Add(_Lable);\n            \/\/\n            var stkH = new StackLayout();\n            stkH.Orientation = StackOrientation.Horizontal;\n            stkH.Add(_button0);\n            stkH.Add(_button1);\n            \/\/\n            stkV.Add(stkH);\n            View = stkV;\n            \/\/\n            Appearing += OnAppearing2;\n        }\n        private void OnAppearing2(object sender, EventArgs e)\n        {\n            Console.WriteLine(\"CellSegment2\");\n            \/\/ \n            _Lable.Text = TitleLabel;\n            _button0.Text = Text0;\n            _button1.Text = Text1;\n            \/\/\n            _button0.Clicked += OnButtonCliced2;\n            _button1.Clicked += OnButtonCliced2;\n            \/\/\n            setButtonColor2();\n        }\n        private void setButtonColor2()\n        {\n            if (SelectedSegment != 0) _button0.BackgroundColor = \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000Colors.White;\n            else _button0.BackgroundColor = Colors.LightCyan;\n            if (SelectedSegment != 1) _button1.BackgroundColor = \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000Colors.White;\n            else _button1.BackgroundColor = Colors.LightCyan;\n        }\n        private void OnButtonCliced2(object sender, EventArgs e)\n        {\n            Button btn = (Button)sender;\n            btn.BackgroundColor = Colors.Gray;\n            if (btn == _button0) SelectedSegment = 0;\n            if (btn == _button1) SelectedSegment = 1;\n            setButtonColor2();\n        }\n        \/\/\n        public static readonly BindableProperty _selectedSegment =\n            BindableProperty.Create(\"SelectedSegment\", typeof(int), \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000typeof(CellSegment2), 0);\n        public int SelectedSegment\n        {\n            get { return (int)GetValue(_selectedSegment); }\n            set { SetValue(_selectedSegment, value); }\n        }\n        \/\/\n        public static readonly BindableProperty _text0 =\n            BindableProperty.Create(\"Text0\", typeof(string), \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000typeof(CellSegment2), \"\");\n        public string Text0\n        {\n            get { return (string)GetValue(_text0); }\n            set { SetValue(_text0, value); }\n        }\n        public static readonly BindableProperty _text1 =\n            BindableProperty.Create(\"Text1\", typeof(string), \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000typeof(CellSegment2), \"\");\n        public string Text1\n        {\n            get { return (string)GetValue(_text1); }\n            set { SetValue(_text1, value); }\n        }\n        public override void UpdateCell()\n        {\n            \/\/tagNo = this.Tag;\n            TitleLabel = dat&#91;2];\n            \/\/label0.Tag = 0;\n            \/\/segment0.SelectedSegment = 0;\n            \/\/segment0.SetTitle(dat&#91;3], 0);\n            Text0 = dat&#91;3];\n            \/\/segment0.SetTitle(dat&#91;4], 1);\n            Text1 = dat&#91;4];\n            \/\/segment0.Tag = 1;\n            Log.Debug($\"CSeg2:UpdateCell={TitleLabel}\");\n        }\n        \/\/ \u4fdd\u5b58\u7528\u30c7\u30fc\u30bf\u30ea\u30b9\u30c8\u623b\u3057\n        public override (int, List&lt;string>) getAttr()\n        {\n            string title = \"\";\n            if (SelectedSegment == 0)\n                title = Text0;\n            else if (SelectedSegment == 1)\n                title = Text1;\n            \/\/\n            List&lt;string> tlist = new List&lt;string>\n            {\n\t\t$\"{SelectedSegment}\",\n                title\n            };\n            if (SelectedSegment > 0)\n                return (1, tlist);   \/\/\u4fee\u6b63\u3042\u308a\n            else\n                return (0, tlist);  \/\/\u4fee\u6b63\u306a\u3057\n        }\n        \/\/ \u4fdd\u5b58\u7528\u30c7\u30fc\u30bf\u30ea\u30b9\u30c8\u8a2d\u5b9a\n        public override void setAttr(List&lt;string> tlist)\n        {\n            SelectedSegment = int.Parse(tlist&#91;0]);\n            setButtonColor2();\n        }\n    }\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\uff12\uff09\u5c5e\u6027\u5165\u529b\u753b\u9762\u306e\u8868\u793a\u4f8b<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">2024\/9\u6708\u521d\u3081\uff1a\u5c5e\u6027\u5165\u529b\u753b\u9762\u306f\u540c\u3058\u69d8\u306a\u753b\u9762\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"739\" height=\"758\" src=\"https:\/\/i0.wp.com\/y42u.net\/tec001\/wp-content\/uploads\/2024\/09\/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-2024-09-09-12.44.24.png?resize=739%2C758&#038;ssl=1\" alt=\"\" class=\"wp-image-2391\" srcset=\"https:\/\/i0.wp.com\/y42u.net\/tec001\/wp-content\/uploads\/2024\/09\/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-2024-09-09-12.44.24.png?w=739&amp;ssl=1 739w, https:\/\/i0.wp.com\/y42u.net\/tec001\/wp-content\/uploads\/2024\/09\/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-2024-09-09-12.44.24.png?resize=292%2C300&amp;ssl=1 292w, https:\/\/i0.wp.com\/y42u.net\/tec001\/wp-content\/uploads\/2024\/09\/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-2024-09-09-12.44.24.png?resize=40%2C40&amp;ssl=1 40w\" sizes=\"(max-width: 739px) 100vw, 739px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\uff13\uff09\u52d5\u4f5c\u8a2d\u5b9a\u753b\u9762\uff1a\u30b4\u30fc\u30b9\u30c8\u767a\u751f<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5c5e\u6027\u5165\u529b\u753b\u9762\u3068\u7570\u306a\u308a\u3001\u3000\u52d5\u4f5c\u8a2d\u5b9a\u753b\u9762\u3067\u306f\u6b21\u306e\u56f3\u306e\u3088\u3046\u306a\u30b4\u30fc\u30b9\u30c8\u304c\u767a\u751f\u3057\u3066\u3044\u307e\u3059\uff08\uff1d\u53f3\u753b\u9762\u306e\u300c\u6e2c\u5b9a\u56de\u6570\u300d\u3084\u300c\u6e2c\u5b9a\u9593\u9694\u300d\u300c\u6e2c\u5b9a\u72b6\u614b\u300d\u304c\u3001\u6709\u52b9\u671f\u9650\u3084\u64cd\u4f5c\u8aac\u660e\u66f8\u306a\u3069\u3068\u91cd\u306a\u3063\u3066\u8868\u793a\u3055\u308c\u308b\uff09\u3002\u305d\u306e\u4ed6\u3067\u3082\u753b\u9762\u3092\u4e0a\u4e0b\u306b\u30b9\u30af\u30ed\u30fc\u30eb\u3059\u308b\u3068\u8868\u793a\u304c\u6d88\u3048\u305f\u308a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7c21\u5358\u306b\u8a00\u3048\u3070\u300cNetMAUI\u306e\u30d0\u30b0\u300d\u3067\u3057\u3087\u3046\u304c\u3001Table\u3092\u4f7f\u3063\u3066\u56fa\u5b9a\u7684\u306aCell\u914d\u7f6e\u3092\u884c\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u4f7f\u3044\u65b9\u3068\u3057\u3066\u3042\u307e\u308a\u826f\u304f\u7121\u3044\u306e\u306f\u78ba\u304b\u3067\u3059\uff08\uff1d\u305d\u308c\u3067\u3082Xamarin\u306e\u6642\u306f\u554f\u984c\u306a\u304f\u52d5\u3044\u3066\u3044\u305f\u306e\u3067\u3001NetMAUI\u306e\u30d0\u30b0\u3067\u3057\u3087\u3046\u3002Net\u306e\u8a18\u4e8b\u3092\u898b\u308b\u3068NetMAUI\u306f\u307e\u3060\u307e\u3060\u30d0\u30b0\u304c\u591a\u3044\u69d8\u3067\u3059\u3002\u307e\u305f\u3001\u73fe\u5728\u4f7f\u7528\u3057\u3066\u3044\u308b\u306e\u306f\u958b\u767a\u74b0\u5883\u306e\u5236\u7d04\u3067Net7.0\u306a\u306e\u3082\u554f\u984c\u304b\u3082\u3057\u308c\u307e\u305b\u3093\uff09\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"742\" height=\"763\" src=\"https:\/\/i0.wp.com\/y42u.net\/tec001\/wp-content\/uploads\/2024\/09\/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-2024-09-09-13.28.50.jpg?resize=742%2C763&#038;ssl=1\" alt=\"\" class=\"wp-image-2394\" srcset=\"https:\/\/i0.wp.com\/y42u.net\/tec001\/wp-content\/uploads\/2024\/09\/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-2024-09-09-13.28.50.jpg?w=742&amp;ssl=1 742w, https:\/\/i0.wp.com\/y42u.net\/tec001\/wp-content\/uploads\/2024\/09\/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-2024-09-09-13.28.50.jpg?resize=292%2C300&amp;ssl=1 292w, https:\/\/i0.wp.com\/y42u.net\/tec001\/wp-content\/uploads\/2024\/09\/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-2024-09-09-13.28.50.jpg?resize=40%2C40&amp;ssl=1 40w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><figcaption class=\"wp-element-caption\">\u30b4\u30fc\u30b9\u30c8\u767a\u751f\u72b6\u6cc1<\/figcaption><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">3-1\uff09\u30b4\u30fc\u30b9\u30c8\u5bfe\u7b56(1)\uff1a\u5168\u3066XAML\u3067\u4f5c\u6210<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">\u8003\u3048\u3066\u307f\u308c\u3070CustomCell\u3092\u4f5c\u3063\u3066\u8272\u3005\u306a\u8a2d\u5b9a\u3092\u8868\u73fe\u3057\u3066\u3044\u308b\u8a33\u3067\u3059\u304c\u3001\u5168\u3066XAML\u3067\u4ee3\u7528\u3067\u304d\u308b\u7b48\u306a\u306e\u3067XAML\u3067\u5168\u3066\u66f8\u304d\u63db\u3048\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u304c\u3001\u7d50\u679c\u306f\u540c\u3058\u3088\u3046\u306a\u30b4\u30fc\u30b9\u30c8\u304c\u767a\u751f\u3057\u3066\u30c0\u30e1\u3067\u3057\u305f\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3-\uff12\uff09\u30b4\u30fc\u30b9\u30c8\u5bfe\u7b56(\uff12)\uff1aTable\u306e\u4f7f\u7528\u3092\u6b62\u3081\u308b<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Table\u306e\u4f7f\u3044\u65b9\u3068\u3057\u3066\u5927\u90e8\u5206\u306f\u540c\u4e00\u5f62\u5f0f\u30c7\u30fc\u30bf\u3092\u30ea\u30b9\u30c8\u306e\u69d8\u306b\u4f7f\u3046\u306e\u3068\u3001\u8868\u793a\u6642\u306b\u6bce\u56deCell\u3092\u4f5c\u6210\u3059\u308b\u306e\u304c\u672c\u9053\u306a\u306e\u3067\u3001\u6700\u521d\u306b\uff11\u5ea6\u3060\u3051\u3001\u8272\u3005\u306a\u5f62\u5f0f\u30c7\u30fc\u30bf\u3092\u4f5c\u6210\u3059\u308b\u4f7f\u3044\u65b9\u306f\u3001NetMAUI\u3067\u306f\u60f3\u5b9a\u5916\u306e\u53ef\u80fd\u6027\u304c\u3042\u308a\u30c6\u30b9\u30c8\u3082\u9593\u306b\u5408\u3063\u3066\u3044\u306a\u3044\u306e\u3067\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u306a\u306e\u3067\u3001\u52d5\u4f5c\u8a2d\u5b9a\u753b\u9762\u306fTable\u3067\u306f\u306a\u304f\u3001StackLayout\u3067\u5168\u3066\u4f5c\u308a\u76f4\u3059\u4e8b\u306b\u3057\u307e\u3059\u3002<br>Table\u3067\u4f7f\u7528\u3059\u308b\u90e8\u54c1\u306fViewcell\u3092\u7d99\u627f\u3057\u3066\u4f5c\u308a\u307e\u3059\u304c\u3001StackLayout\u3067\u4f7f\u7528\u3059\u308b\u90e8\u54c1\u306a\u306e\u3067ContentView\u3092\u7d99\u627f\u3057\u3066\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u4f8b\u306e\u69d8\u306b\u3001CustomViewCell\u3092\u30d9\u30fc\u30b9\u306bContentView\u7528\u306b\u5909\u3048\u3066\u3044\u304d\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>NetMAUI\uff1aViewCell\u304b\u3089ContentView\u306b\u5909\u66f4\uff1a\n&lt;\u5171\u901a\u90e8\u5206\u4f8b>\n    public class <strong>SettingPartsBase<\/strong> : <strong>ContentView<\/strong>\n    {\n        public Label _titleLabel = new Label { Text = \"TitleLabel\", \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000Padding = new Thickness(0, 0, 0, 0) };\n        \/\/------------------------------------------\n        \/\/  TitleLabel-->TitleLabelProperty \u306fxml\u3068\u306ebind\u540d\u79f0\u306b\u81ea\u52d5\u7684\u306b\u306a\u308b\n        public readonly BindableProperty TitleLabelProperty =\n            BindableProperty.Create(nameof(TitleLabel), typeof(string),\n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000 typeof(MarkCellBase), default(string));\n        public string TitleLabel\n        {\n            get { return (string)GetValue(TitleLabelProperty); }\n            set { SetValue(TitleLabelProperty, value); }\n        }\n        \/\/------------------------------------------\n        public SettingPartsBase() : base()\n        {\n            \/\/\u3053\u3053\u3067\u306f\u4f55\u3082\u3057\u306a\u3044\n        }\n    }\n\n    public class <strong>SettingPartsSegment2<\/strong> : <strong>SettingPartsBase<\/strong>\n    {\n        public Button _button0 = new Button { Text = \"Text0\" };\n        public Button _button1 = new Button { Text = \"Text1\" };\n        \/\/-----------------------------------------\n        public static readonly BindableProperty SelectedSegmentProperty =\n            BindableProperty.Create(nameof(SelectedSegment), typeof(int),\n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000 typeof(SettingPartsSegment2), default(int));\n        public int SelectedSegment\n        {\n            get { return (int)GetValue(SelectedSegmentProperty); }\n            set { SetValue(SelectedSegmentProperty, value); }\n        }\n        public static readonly BindableProperty _text0 =\n            BindableProperty.Create(nameof(Text0), typeof(string), \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000typeof(SettingPartsSegment2), default(string));\n        public string Text0\n        {\n            get { return (string)GetValue(_text0); }\n            set { SetValue(_text0, value); }\n        }\n        public static readonly BindableProperty _text1 =\n            BindableProperty.Create(nameof(Text1), typeof(string),\n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000 typeof(SettingPartsSegment2), default(string));\n        public string Text1\n        {\n            get { return (string)GetValue(_text1); }\n            set { SetValue(_text1, value); }\n        }\n        \/\/-----------------------------------------\n        public SettingPartsSegment2() : base()\n        {\n            var stkV = new StackLayout();\n            stkV.Add(_titleLabel);\n            \/\/\n            var stkH = new StackLayout() { Padding =\n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000 new Thickness(10, 0, 0, 0) };\n            stkH.Orientation = StackOrientation.Horizontal;\n            stkH.Add(_button0);\n            stkH.Add(_button1);\n            \/\/\n            stkV.Add(stkH);\n            this.Content = stkV;\n            \/\/\n            this.Loaded += OnAppearing2;\n        }\n\n        private void OnAppearing2(object? sender, EventArgs e)\n        {\n            Console.WriteLine(\"CellSegment2\");\n            _titleLabel.Text= TitleLabel;\n            _button0.Text = Text0;\n            _button1.Text = Text1;\n            \/\/\n            int baseWidth = App.Width - 60;\n            _button0.WidthRequest = baseWidth \/ 2;\n            _button1.WidthRequest = _button0.WidthRequest;\n            \/\/\n            _button0.Clicked += OnButtonCliced2;\n            _button1.Clicked += OnButtonCliced2;\n            \/\/\n            setButtonColor2();\n        }\n        private void setButtonColor2()\n        {\n            if (SelectedSegment != 0) \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000_button0.BackgroundColor = Colors.White;\n            else \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000_button0.BackgroundColor = Colors.LightCyan;\n            if (SelectedSegment != 1) \n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000_button1.BackgroundColor = Colors.White;\n            else _button1.BackgroundColor = Colors.LightCyan;\n        }\n        private void OnButtonCliced2(object? sender, EventArgs e)\n        {\n            if (sender is null)\n                return;\n            Button btn = (Button)sender;\n            btn.BackgroundColor = Colors.Gray;\n            if (btn == _button0) SelectedSegment = 0;\n            if (btn == _button1) SelectedSegment = 1;\n            setButtonColor2();\n        }\n    }<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">5)\u52d5\u4f5c\u8a2d\u5b9a\u753b\u9762\u8868\u793a\u4f8b<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">2024\/9\u6708\u521d\u3081\uff1a\u52d5\u4f5c\u8a2d\u5b9a\u753b\u9762\u306f\u540c\u3058\u69d8\u306a\u753b\u9762\u306b\u306a\u308a\u307e\u3057\u305f\uff08\u968f\u5206\u30b3\u30f3\u30d1\u30af\u30c8\u306b\u306a\u308a\u307e\u3057\u305f\uff09\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"742\" height=\"769\" src=\"https:\/\/i0.wp.com\/y42u.net\/tec001\/wp-content\/uploads\/2024\/09\/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-2024-09-09-14.35.26.jpg?resize=742%2C769&#038;ssl=1\" alt=\"\" class=\"wp-image-2395\" srcset=\"https:\/\/i0.wp.com\/y42u.net\/tec001\/wp-content\/uploads\/2024\/09\/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-2024-09-09-14.35.26.jpg?w=742&amp;ssl=1 742w, https:\/\/i0.wp.com\/y42u.net\/tec001\/wp-content\/uploads\/2024\/09\/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-2024-09-09-14.35.26.jpg?resize=289%2C300&amp;ssl=1 289w, https:\/\/i0.wp.com\/y42u.net\/tec001\/wp-content\/uploads\/2024\/09\/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-2024-09-09-14.35.26.jpg?resize=40%2C40&amp;ssl=1 40w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><figcaption class=\"wp-element-caption\">\u52d5\u4f5c\u8a2d\u5b9a\u753b\u9762\u30fctop<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"750\" height=\"761\" src=\"https:\/\/i0.wp.com\/y42u.net\/tec001\/wp-content\/uploads\/2024\/09\/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-2024-09-09-14.38.01.jpg?resize=750%2C761&#038;ssl=1\" alt=\"\" class=\"wp-image-2396\" srcset=\"https:\/\/i0.wp.com\/y42u.net\/tec001\/wp-content\/uploads\/2024\/09\/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-2024-09-09-14.38.01.jpg?w=750&amp;ssl=1 750w, https:\/\/i0.wp.com\/y42u.net\/tec001\/wp-content\/uploads\/2024\/09\/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-2024-09-09-14.38.01.jpg?resize=296%2C300&amp;ssl=1 296w, https:\/\/i0.wp.com\/y42u.net\/tec001\/wp-content\/uploads\/2024\/09\/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-2024-09-09-14.38.01.jpg?resize=40%2C40&amp;ssl=1 40w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><figcaption class=\"wp-element-caption\">\u52d5\u4f5c\u8a2d\u5b9a\u753b\u9762-middle<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"745\" height=\"765\" src=\"https:\/\/i0.wp.com\/y42u.net\/tec001\/wp-content\/uploads\/2024\/09\/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-2024-09-09-14.38.31.jpg?resize=745%2C765&#038;ssl=1\" alt=\"\" class=\"wp-image-2397\" srcset=\"https:\/\/i0.wp.com\/y42u.net\/tec001\/wp-content\/uploads\/2024\/09\/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-2024-09-09-14.38.31.jpg?w=745&amp;ssl=1 745w, https:\/\/i0.wp.com\/y42u.net\/tec001\/wp-content\/uploads\/2024\/09\/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-2024-09-09-14.38.31.jpg?resize=292%2C300&amp;ssl=1 292w, https:\/\/i0.wp.com\/y42u.net\/tec001\/wp-content\/uploads\/2024\/09\/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-2024-09-09-14.38.31.jpg?resize=40%2C40&amp;ssl=1 40w\" sizes=\"(max-width: 745px) 100vw, 745px\" \/><figcaption class=\"wp-element-caption\">\u52d5\u4f5c\u8a2d\u5b9a\u753b\u9762-buttom<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Xamarin\u306e\u6642\u304b\u3089iOS\u306e\u300cSegment\u300d\u306b\u5bfe\u3059\u308bTable\u7528GUI\u90e8\u54c1\u304c\u306a\u304b\u3063\u305f\u306e\u3067\u3001CustamCell\u3092\u4f5c\u6210\u3057\u3066\u5bfe\u5fdc\u3057\u3066\u3044\u305f\u3002NetMAUI\u3067\u306f\u3069\u306e\u69d8\u306b\u5bfe\u5fdc\u3059\u308b\u304b\u3002\u3002\u3002\u306e\u30c9\u30bf\u30d0\u30bf\u5287\u3067\u3059\u3002 \uff11\uff09\u8a2d\u5b9a\u753b\u9762\u306e\u79fb\u690d\uff1a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2345,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"common","vkexunit_cta_each_option":"","_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[145,1],"tags":[155,151,147,146],"class_list":["post-2341","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-netmaui","category-uncategorized","tag-customcontentview","tag-customviewcell","tag-netmaui","tag-xamarin"],"veu_head_title_object":{"title":"","add_site_title":""},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/y42u.net\/tec001\/wp-content\/uploads\/2024\/08\/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-2024-08-23-10.24.19.png?fit=570%2C261&ssl=1","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/y42u.net\/tec001\/wp-json\/wp\/v2\/posts\/2341","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/y42u.net\/tec001\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/y42u.net\/tec001\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/y42u.net\/tec001\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/y42u.net\/tec001\/wp-json\/wp\/v2\/comments?post=2341"}],"version-history":[{"count":3,"href":"https:\/\/y42u.net\/tec001\/wp-json\/wp\/v2\/posts\/2341\/revisions"}],"predecessor-version":[{"id":2398,"href":"https:\/\/y42u.net\/tec001\/wp-json\/wp\/v2\/posts\/2341\/revisions\/2398"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/y42u.net\/tec001\/wp-json\/wp\/v2\/media\/2345"}],"wp:attachment":[{"href":"https:\/\/y42u.net\/tec001\/wp-json\/wp\/v2\/media?parent=2341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/y42u.net\/tec001\/wp-json\/wp\/v2\/categories?post=2341"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/y42u.net\/tec001\/wp-json\/wp\/v2\/tags?post=2341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}