https://docs.microsoft.com/ko-kr/azure/app-service-mobile/app-service-mobile-dotnet-backend-how-to-use-server-sdk#create-app

 

Xamarin.Forms을 사용하여 Mobile Apps 시작

이 자습서에 따라 Mobile Apps를 사용하여 Xamarin.Forms 개발을 시작할 수 있습니다.

docs.microsoft.com

위 링크를 진행한 내용입니다.

링크 내용이 부족한것도 있고 상세하지 못한것도 있어서 제가 직접 진행한 내용을
화면 캡쳐 위주로 알아보겠습니다.

1. 리소스 만들기 에서 Mobile App 를 선택

2. 만들기..

3. 앱이름 과 리소스 그룹을 지정합니다. (리소스 그룹은 새로만들기 선택)

4. 배포가 진행됩니다. (조금 시간이 걸립니다.)

5. App Service 를 선택하여 현재 만든 app 를 확인합니다.

6. 아래처럼 잘 만들어진 걸 확인합니다.

7. 빠른 시작 을 선택하고 Xamarin.Forms 를 선택합니다.

8. 1번에 DB 서버를 생성을 위해 느낌표항목을 선택

9. 데이터연결 에서 추가 버튼을 선택

10. 데이터 연결 추가 에서 필수 연결 구성을 선택

11. 데이터베이스 에서 새 데이터베이스 만들기 를 선택

12. SQL Database 에서 이름을 지정하고 필수 설정 구성 을 선택

13. 새 서버 만들기 를 선택

14. 새서버 정보를 입력합니다. 그리고 하단의 선택을 클릭

15. 앞서 항목들도 선택 및 확인을 합니다.

16. 연결 문자열에 느낌표 표시를 선택하고 확인합니다.

17. 배포가 진행됩니다.

18. Xamarin.Forms 에서 백앤드 언어를 Node.js(C#도 있음) 를 선택하고 다운로드 합니다.

19. 다운로드된 프로젝트를 엽니다.

20. 아래 처럼 기본적인 구성을 가진 Xamarin.Forms 솔루션이 미리 구성되어 있는걸 확인할수 있습니다.

21. Azure Portal 에서 SQL 데이터 베이스 를 선택하고 좀전에 만든 DB 를 선택하면

아래 처럼 기본적인 정보를 확인할수 있습니다.

22. 여기서 연결 문자열을 선택하면 프로젝트에서 사용할수 있는 DB 연결 문자열을 가져올수 있습니다.

23. 아래는 만들어진 서버 정보

24 다시 프로젝트로 돌아와 안드로이드로 실행한 결과는 ..

작동 방식은 상단의 항목을 입력하고 + 버튼을 누르면 추가됩니다.

선택하면 팝업이 뜨고 길게 누르면 상단의 COMPLETE 버튼이 활성화 되고 선택시 항목이 삭제 됩니다.

 

 

 

25. 아래는 UWP

26 아래는 아이폰 (오른쪽)

27. 입력을 몇번 해보니 아래처럼 그래프가 올라간걸 확인할수 있습니다.

데이터를 확인해 보기위해 상단의 '다음을 사용하여 연결' 을 선택합니다.

28. Visual Studio 를 선택하고 Visual Studio 열기를 합니다.

29. 아래 처럼 Visual Studio 가 열리고 앞서 설정된 Server 비번을 넣고 연결합니다.

30. 확인

31. 왼쪽의 테이블을 선택하면 데이터를 확인할수 있습니다. (시간 걸림)

 

완료

 

* 티스토리 글쓰기가 정말 힘들어 졌군요;; 글쓰는데 버거림이 심하군요;;

 

apple 앱 업로드 후 아래 처럼 메일이 왔다..


Dear Developer,

We identified one or more issues with a recent delivery for your app, "미세모아". Please correct the following issues, then upload again.

Invalid Bundle - Ensure that app executables and bundled frameworks use consistent architectures

Best regards,

The App Store Team


아키텍쳐가 안맞다는 소리인데..

기존 출시 했던 앱들과 비교해 보니 '국제화' 부분이 문제였다..

cjk 를 체크하고 빌드후 업로드 하니 제대로 업로드가 되었다.

아래는 iOS 빌드 설정 화면이다.

아.. 아직도 삽질을..;;

 

 

 

WebView 에 Html 소스 코드를 이용 아래처럼 이미지를 넣었는데

string html = $@"
        <html>
        	<body bgcolor='black'>
        		<div style='width: 300px; height: 160px; overflow: hidden; position: relative; align-items:center;justify-content:center;'>
        			<img src='{이미지경로}' style='position: absolute; top:0px; left:-40px; width:380px; height: 180px;'/>
        		</div>
        	</body>
        </html>";
        
this.localWebView.Source = new HtmlWebViewSource() { Html = html };

아래 처럼 물음표가 떴다.

안드로이드에서는 아무 이상없이 표시 되었던 항목이 표시가 안되었다.

이를 해결하긴 위해서는 Info.plist 에 아래 항목을 추가해야한다.

	<key>NSAppTransportSecurity</key>
	<dict>
		<key>NSAllowsArbitraryLoads </key>
		<true/>
		<key>NSAllowsArbitraryLoadsInWebContent</key>
		<true/>
	</dict>


위항목을 추가하니 아래처럼 이미지가 제대로 표시가 되었다.

https://raw.githubusercontent.com/xamarin/ios-samples/master/PrivacyPrompts/PrivacyPrompts/Info.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>UISupportedInterfaceOrientations</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
		<string>UIInterfaceOrientationLandscapeLeft</string>
		<string>UIInterfaceOrientationLandscapeRight</string>
	</array>
	<key>UIMainStoryboardFile</key>
	<string>MainStoryboard</string>
	<key>MinimumOSVersion</key>
	<string>9.0</string>
	<key>UIStatusBarStyle</key>
	<string>UIStatusBarStyleBlackTranslucent</string>
	<key>NSLocationWhenInUseUsageDescription</key>
	<string>This string is stored in the info.plist file.</string>
	<key>XSAppIconAssets</key>
	<string>Resources/Images.xcassets/AppIcon.appiconset</string>
	<key>XSLaunchImageAssets</key>
	<string>Resources/Images.xcassets/LaunchImage.launchimage</string>
	<key>CFBundleDisplayName</key>
	<string>PrivacyPrompts</string>
	<key>CFBundleIdentifier</key>
	<string>com.xamarin.PrivacyPrompts</string>
	<key>CFBundleShortVersionString</key>
	<string>1</string>
	<key>CFBundleVersion</key>
	<string>1</string>
	<key>CFBundleName</key>
	<string>PrivacyPrompts</string>
	<key>NSCalendarsUsageDescription</key>
	<string>PrivacyPrompts App needs Calendars Access</string>
	<key>NSCameraUsageDescription</key>
	<string>Take videos</string>
	<key>NSRemindersUsageDescription</key>
	<string>PrivacyPrompts App needs Reminders Access</string>
	<key>NSContactsUsageDescription</key>
	<string>PrivacyPrompts App needs Contacts Access</string>
	<key>NSPhotoLibraryUsageDescription</key>
	<string>PrivacyPrompts App needs Photo Library Access</string>
	<key>NSMicrophoneUsageDescription</key>
	<string>PrivacyPrompts App needs Microphone Access</string>
	<key>NSMotionUsageDescription</key>
	<string>PrivacyPrompts App needs Motion Usage Access</string>
	<key>NSBluetoothPeripheralUsageDescription</key>
	<string>PrivacyPrompts App needs Bluetooth Access</string>
	<key>NSAppleMusicUsageDescription</key>
	<string>Add tracks to your music library</string>
	<key>NSSiriUsageDescription</key>
	<string>Send text messages.</string>
	<key>NSSpeechRecognitionUsageDescription</key>
	<string>Transcribe your lessons.</string>
</dict>
</plist>

info.plist
0.00MB

 

자마린과 React Native 의 차이가 궁금하다면.. 여기로...
https://www.mobileappdaily.com/2018/08/7/xamarin-vs-react-native/amp




Two of the popular cross-platform frameworks includes React Native and Xamarin. The year 2018 was stellar concerning apps that were produced in any defined year and most of these applications were developed using these two influential cross-platform mobile app development frameworks.

iOS applications have always used Objective-C and Swift programming language whereas, for Android the programming language is Java. And, if we talk about the trend in the modern app development domain, it is shifting greatly with the introduction of new and innovative tools.

For your better understanding of Xamarin and React Native, we have stricken a fair comparison titled ‘Xamarin Vs React Native’ which highlight the significant differences between the two frameworks.

About Xamarin

Xamarin is a cross-platform framework for the implementations of the Common Language Infrastructures. It came into the market in 2011 and was acquired by Microsoft in 2016. Xamarin has an armory of tools that can be handy for developers to build cross-platform mobile apps.

Xamarin app development framework lets the developer create Android and iOS apps with Xamarin tools which can be downloaded with Visual Studio. Due to its excellent functionalities, Xamarin is deployed by more than 15,000 companies.

About React Native

React Native is a JavaScript framework for developing mobile apps for iOS and Android. React native is based on React which itself is a Facebook’s JavaScript library for crafting UIs. But it targets mobile platforms and not browsers.

To put it simply, the developers can develop mobile apps with full look and feel of “native.” The best part of React Native app development framework is that due to its code-sharing ease, an app can be simultaneously developed for both Android and iOS.

React Native Vs Xamarin

Xamarin Vs React Native: Comparison

Below are some crucial factors on which, we will proceed to compare react native and Xamarin frameworks:

1. React Native vs Xamarin: Usage

a. Use of React Native

Now let’s talk about the uses of React Native framework, as it works on the modern one-way data flow. This app development framework is productive in a marginal way. Recently, some changes have been brought to the framework, particularly in the JS development ecosystem. And thus if you are someone who loves Java then you are sure to love this too.

b. Use of Xamarin

Xamarin also provides great offerings for the application developers and programmers who work on ASP.NET MVC, Web Forms, or other MVC platforms. This language works exceptionally well on the prescribed platforms and thus a number of developers like to work with this particular framework the most.

Another offering for the developers is that the Xamarin framework offers functionality to integrate well within the MVVM a.k.a. ‘Model–View–Viewmodel’ framework style.

Verdict: Owing to the functionality factor that both of these frameworks offer, this has to be a tie between the two.

React vs Xamarin

2. React Native vs Xamarin: Development platforms

a. React Native Development Environment

The best thing about the components of React Native is that they offer Integrated Development Environment which is also known as IDE to the developers. The developers can then also use Expo to debug and develop a React Native application. Hot loading is another great feature that developers can use while working with this development framework.

b. Xamarin Development Environment

Xamarin is powerful in this context because here the developers can write their code for an iPhone app even on Windows and then compile the same for Mac. And that makes it the best choice for the app developers.

However, programmers/developers would need a platform that they would utilize for the built. And this process is actually quite powerful for that.

Verdict: Depending upon the functionality, we declare Xamarin as the winner here.

3. React Native vs Xamarin: Community Support

a. React Native Community Assistance

A fair comparison of React Native with other frameworks shows it is relatively young and needs to go long way before making its position prominent in the industry. Interestingly, a wide collaboration among developers across the globe has made it possible to rank react Native in one of the best JavaScript frameworks available in the market.

However, the community support of developers is there for the language but is not as extensive as the support available for other programming languages.

b. Xamarin Community Assistance

If we talk about the support, this cross-platform framework has got great support from the community forums. Xamarin is used by companies like Coca-Cola and Gummy Drop. Moreover, there are additional sources like Stack Overflow that offers huge support to Xamarin. While working with the programming language a developer can find great information from the different sources.

With the availability of Xamarin Forms, the developers can share visual elements and part of the codebase, it in turns, helps the overall Xamarin community with a lot of tips, tools, and data.

Verdict: Owing to the functionality, Xamarin is declared the winner.

Xamarin vs React Native

4. React Native vs Xamarin: Ready-Made Components

a. React Native Components

React Native does offer ready-made codes, but there are chances that the codes which are available today can have a better version in the near future and nobody wants their app to get outdated so soon. So, it makes more sense, if the developer defines the components in the first go, which he wants to embed in the React Native app.

Still, if the developer is willing to use the code, he must update it once the better version arrives or the codes can be replaced altogether; thanks to React Native’s component-level modularity.

b. Xamarin Components

Sometimes, the Xamarin codes can be complex, but there is a high probability that a developer can find similar codes related to their projects, especially when if someone is searching for coding buttons with very specific characteristics. For the community assistance, Xamarin team themselves share various ready-made components and codes at regular intervals of time, which further aid the developers to come up with beautiful and functional apps.

Verdict: Due to the ease of codes usability, Xamarin scores over React Native

5. React Native vs Xamarin: Code Deployment and App Performance

In general, there is not much difference in the app performance developed using React Native and Xamarin. Still, if you wish to know the difference, we have to deep dive into the technical aspects of performance and deployment.

Here are some of the concepts that you need to consider:

  • 64-bits support: It’s a universal fact that an architecture based on 64-bit code performs better than 32-bit code. And, React Native doesn’t support 64-bits Android apps, which of course is a downside for it. On the other hand, Xamarin easily supports 64-bit architectures.
  • JIT and AOT: React Native and Xamarin are not compiled to native. In React Native, Javascript is interpreted during compilation, whereas, .NET language is compiled to binary code in Xamarin.
  • Just in Time (JIT) compilation: It compiles bytecode into native at runtime. In React Native, JavaScriptCore can be deployed to interpret Javascript for iOS and Android apps.
  • Ahead of time (AOT) compilation: As the name suggests, all the codes are compiled well before the processing of the app. It can be used in Xamarin for both iOS and Android apps, but React native clearly lacks here.

Xamarin vs React Native

a. React Native Code Deployment and App Performance

React Native uses JavaScript coding but on an internal level, the framework uses the same fundamental UI blocks as any other Android or iOS applications. JavaScriptCore can also be used on the Android platform but it prevents the JIT (Just in Time) compilation that is being used on Android.

b. Xamarin Code Deployment and App Performance

Talking about Xamarin, this cross-platform framework uses C# along with using JIT compilation and AOT (ahead of time) compilation. Owing to the fact that iOS prevents the JIT compilation, Xamarin AOT is used to compile the application. The platform takes JIT as the default compilation but it can also be configured to Ahead of Time compilation.

Verdict: This fair comparison makes us declare Xamarin framework as the winner in the compilation race.

6. React Native vs Xamarin: Compilation Time and Development Speed

a. React Native Compilation Time and Development Speed

React Native scripted and hence, it’s quite effective. It adds more value to the app, as when the process seems to slow down, we can reload the Javascript, and thus the can be tested and modified quickly. Interestingly, React Native apps and web apps can be debugged in a similar manner. The Chrome developer tool can be deployed to debug the app where ever it’s needed.

b. Xamarin Compilation Time and Development Speed

With time, the compilation of Xamarin apps increases and if there is some bigger project, more time is required for the compilation. And all these factors can directly impact the project time and cost. To bypass this, the developers can go for the Gorilla option, which allows faster Preview of the UI while coding.

Verdict: React Native

Xamarin vs React Native

7. React Native vs Xamarin: App Testing

a. React Native Testing Tools

With the right set of tools in hand, testing React Native components is quite simple. For static type testing, React Native has a tool called PropTypes, which requires almost no setup. The unit and integration testing in React Native can be done with the help of test runner and an assertion library which comes in the form of Jest, a javascript testing framework with rich API for behavior and spec tests

b. Xamarin Testing Tools

Testing tools like NUnit and Xamarin Test Recorder can be used to test cross-platform UIs. Both of these tools let the developer create the test which they wish to execute. For wider ranges of devices, Xamarin Test Cloud can be brought into play.

Verdict: Both React Native and Xamarin are on the same page regarding the testing tools.

8. React Native vs Xamarin: Designing Aspects

a. React Native Designing Aspects

UI remains one of the significant factors while developing an app, as the developer devotes much of the time during the UI designing. Regarding UI, React Native is similar to Xamarin.Forms as both these frameworks use native widgets and implement UI once.

But as compared to Xamarin, React Native let the developer customize visual components and cut down the requirement of custom renders.

b. Designing Aspects

With Xamarin, the developer can design the UI in a platform-specific way or through Xamarin.Forms. For the greater flexibility, Custom Renderers can be deployed when the exact same look is desired across platforms. However, it takes time in the implementation while generating the Custom Renderers.

Verdict: Thanks to native tools and Xamarin.Forms, Xamarin takes the crown.

How To Choose Right Tool For Cross-Platform Mobile App Development?

The race of comparison between Xamarin and React Native ends here and by looking at the overall comparison, Xamarin does take a lead, but React Native is equally competitive. Both of these frameworks i.e. Xamarin Vs React Native are exceptionally well when we talk about the features and the functionality they have.

The choice of cross-platform mobile app development framework depends upon the app requirements, functionalities, and features. Every framework has its pros and cons, therefore, as per the need, the framework should be picked.

Xamarin vs React Native

We really hope that with the help of this article, we were able to clear up some of your doubts regarding the development of cross-platform mobile apps. To read more interesting articles on technologies related to app development companies, subscribe to MobileAppDaily.


fatal signal 6 (sigabrt)

위 에러는 리소스 문제일 가능성이 큽니다.

전 Renderer 에서 폰트를 아래와 같이 정의했는데

        protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.Editor> e)
        {
            base.OnElementChanged(e);

            if (Control != null)
            {
                Control.Typeface = Typeface.CreateFromAsset(base.Context.Assets, "Binggrae.ttf");
            }
        }

매번 Create 해서 발생된 문제였습니다.

아래 처럼 변경하니 에러가 해결되었습니다.

        private static Typeface typeface;

        protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.Editor> e)
        {
            base.OnElementChanged(e);

            if (Control != null)
            {
                if (typeface == null)
                {
                    typeface = Typeface.CreateFromAsset(base.Context.Assets, "Binggrae.ttf");
                }

                Control.Typeface = typeface;
            }
        }

// selectPath : SQLite DB 파일 백업 폴더 위치

Java.IO.File sd = new Java.IO.File(selectPath);

// 폴더가 존재하지 않으면 만든다.

if (!sd.Exists())
{
    sd.Mkdirs();
}

Java.IO.File data = Android.OS.Environment.DataDirectory;
// System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments);


FileChannel source = null;
FileChannel destination = null;

//  data 가 두번 붙는거 방지 (안드로이드 버전에 따라 다르게 나오는 부분 처리)

List<string> pathList = Constant.DBPath.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries).ToList();

if (pathList[0] == "data")
{
    pathList.RemoveAt(0);
}

string path = string.Join("/", pathList);

string currentDBPath = path;

string backupDBPath = "test.db";
Java.IO.File currentDB = new Java.IO.File(data, currentDBPath);
Java.IO.File backupDB = new Java.IO.File(sd, backupDBPath);
try
{
    source = new FileInputStream(currentDB).Channel;
    destination = new FileOutputStream(backupDB).Channel;
    destination.TransferFrom(source, 0, source.Size());
    source.Close();
    destination.Close();
    Toast.MakeText(this, "백업 완료! - " + backupDB.Path, ToastLength.Long).Show();
}
catch (Java.Lang.Exception ex)
{
    ex.PrintStackTrace();
}

 

Xamarin.Forms 콤보박스 컨트롤인 Picker 컨트롤에는 화살표시가 없습니다.

 

화살표시를 나타내기 위해서는 렌더러를 이용해야합니다.

우선 화살표 이미지를 먼저 구해야합니다. (전 아래 이미지로..)

  (downarrow)

사용할 이미지를 Android 프로젝트의 Resources/drawable 폴더에, iOS 프로젝트의 Resources 폴더에 추가합니다.

 

먼저 .Net Standard 프로젝트에

CustomPicker.cs 를 추가합니다.

using Xamarin.Forms;

namespace Test.Cntrol
{
    public class CustomPicker : Picker
    {
        public static readonly BindableProperty ImageProperty =
            BindableProperty.Create(nameof(Image), typeof(string), typeof(CustomPicker), string.Empty);

        public string Image
        {
            get { return (string)GetValue(ImageProperty); }
            set { SetValue(ImageProperty, value); }
        }

        public CustomPicker() : base()
        {
            Margin = 3;
        }
    }
}

 

Android 프로젝트에 CustomPickerRenderer.cs 를 추가합니다.

using Android.Content;
using Android.Graphics;
using Android.Graphics.Drawables;
using Android.Support.V4.Content;
using Test.Cntrol;
using Test.Droid;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;

[assembly: ExportRenderer(typeof(CustomPicker), typeof(CustomPickerRenderer))]
namespace Test.Droid
{
    public class CustomPickerRenderer : PickerRenderer
    {
        CustomPicker element;

        public CustomPickerRenderer(Context context) : base(context)
        {
        }

        protected override void OnElementChanged(ElementChangedEventArgs<Picker> e)
        {
            base.OnElementChanged(e);

            element = (CustomPicker)this.Element;

            if (Control != null && this.Element != null && !string.IsNullOrEmpty(element.Image))
                Control.Background = AddPickerStyles(element.Image);
        }

        public LayerDrawable AddPickerStyles(string imagePath)
        {
            ShapeDrawable border = new ShapeDrawable();
            border.Paint.Color = Android.Graphics.Color.Gray;
            border.SetPadding(10, 10, 10, 10);
            border.Paint.SetStyle(Paint.Style.Stroke);

            Drawable[] layers = { border, GetDrawable(imagePath) };
            LayerDrawable layerDrawable = new LayerDrawable(layers);
            layerDrawable.SetLayerInset(0, 0, 0, 0, 0);

            return layerDrawable;
        }

        private BitmapDrawable GetDrawable(string imagePath)
        {
            int resID = Resources.GetIdentifier(imagePath, "drawable", this.Context.PackageName);
            var drawable = ContextCompat.GetDrawable(this.Context, resID);
            var bitmap = ((BitmapDrawable)drawable).Bitmap;

            var result = new BitmapDrawable(Resources, Bitmap.CreateScaledBitmap(bitmap, 70, 70, true));
            result.Gravity = Android.Views.GravityFlags.Right;

            return result;
        }
    }
}

 

iOS 프로젝트에도 CustomPickerRenderer.cs 를 추가합니다.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Foundation;
using Test.Cntrol;
using Test.iOS;
using UIKit;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;

[assembly: ExportRenderer(typeof(CustomPicker), typeof(CustomPickerRenderer))]
namespace Test.iOS
{
    public class CustomPickerRenderer : PickerRenderer
    {
        protected override void OnElementChanged(ElementChangedEventArgs<Picker> e)
        {
            base.OnElementChanged(e);

            var element = (CustomPicker)this.Element;

            if (this.Control != null && this.Element != null && !string.IsNullOrEmpty(element.Image))
            {
                var downarrow = UIImage.FromBundle(element.Image);
                Control.RightViewMode = UITextFieldViewMode.Always;
                Control.RightView = new UIImageView(downarrow);
            }
        }
    }
}

 

이제 화면 상에서 아래 처럼 컨트롤을 정의한후 데이터를 바인딩하면

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:cntrol="clr-namespace:Test.Cntrol"
             x:Class="Test.MainPage">
    <StackLayout Spacing="5">
      
      <cntrol:CustomPicker x:Name="customPicker"
                           HeightRequest="40"
                           Margin="10"
                           Image="downarrow"
                           Title="Custom Picker"/>
    </StackLayout>
</ContentPage>

아래처럼 화살표시가 Picker 에 표시됩니다.

 

 

 

계속 폰으로 디버깅 하다가 원격으로 붙을 일이있어 에뮬레이터를 가동시켰는데

아래와 같이 떴다.. ??? 머지???

이전에 잘 사용했던 놈인데 갑자기 비번을 물어본다...;;

 

해결방법은 에뮬레이터 장치를 초기화해야한다. (원인은.. 모름모름..)

도구->Android->Android Device Manager 에서 장치목록에서 마우스 우클릭 후 나온 메뉴에서 '초기화' 를 하면된다.

 

아래처럼 에뮬레이터가 잘 실행되었다.

 

TabbedPage 는 각 화면에서 좌우 스크롤을 하면 옆 페이지로 이동합니다.

그런데 이를 막고 싶을때가 있습니다.

만약 좌우 스크롤이 탭안의 페이지에서 사용될때가 그 경우가 되겠죠

이를 막는 방법은 TabbedPage 의 소스상에서 아래의 코드를 넣어주면 됩니다.

 

this.On<Xamarin.Forms.PlatformConfiguration.Android>().SetIsSwipePagingEnabled(false); 

아래처럼 좌우 스크롤을 해도 탭페이지가 이동되지 않습니다.

 

 

 

 

+ Recent posts