Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Added Tizen Mobile Blazor Bindings #285

Merged
merged 6 commits into from
Jan 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CI/CI.Windows.proj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<ProjectToBuild Include="..\src\Microsoft.MobileBlazorBindings.WebView.Android\Microsoft.MobileBlazorBindings.WebView.Android.csproj" />
<ProjectToBuild Include="..\src\Microsoft.MobileBlazorBindings.WebView.iOS\Microsoft.MobileBlazorBindings.WebView.iOS.csproj" />
<ProjectToBuild Include="..\src\Microsoft.MobileBlazorBindings.WebView.macOS\Microsoft.MobileBlazorBindings.WebView.macOS.csproj" />
<ProjectToBuild Include="..\src\Microsoft.MobileBlazorBindings.WebView.Tizen\Microsoft.MobileBlazorBindings.WebView.Tizen.csproj" />
<ProjectToBuild Include="..\src\Microsoft.MobileBlazorBindings.Core\Microsoft.MobileBlazorBindings.Core.csproj" />
<ProjectToBuild Include="..\src\Microsoft.MobileBlazorBindings\Microsoft.MobileBlazorBindings.csproj" />
<ProjectToBuild Include="..\src\Microsoft.MobileBlazorBindings.DualScreen\Microsoft.MobileBlazorBindings.DualScreen.csproj" />
Expand Down
60 changes: 60 additions & 0 deletions MobileBlazorBindings.sln
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.MobileBlazorBindi
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.MobileBlazorBindings.WebView.Windows", "src\Microsoft.MobileBlazorBindings.WebView.Windows\Microsoft.MobileBlazorBindings.WebView.Windows.csproj", "{69571F1B-D2C2-4152-A15D-F753397AFC16}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.MobileBlazorBindings.WebView.Tizen", "src\Microsoft.MobileBlazorBindings.WebView.Tizen\Microsoft.MobileBlazorBindings.WebView.Tizen.csproj", "{F4B0D8B4-B596-422D-BFD6-DBD43EC1075F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "HybridAppSample", "HybridAppSample", "{0D2AAC54-5DE7-42F7-A839-1B2C550EE070}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HybridApp", "samples\HybridApp\HybridApp\HybridApp.csproj", "{01A7CEE6-B551-41CE-99F7-2C6B29566C9B}"
Expand All @@ -94,6 +96,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HybridApp.macOS", "samples\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HybridApp.Windows", "samples\HybridApp\HybridApp.Windows\HybridApp.Windows.csproj", "{59D7D9FA-FD6A-4D7C-B20C-D82A9AEACC77}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HybridApp.Tizen", "samples\HybridApp\HybridApp.Tizen\HybridApp.Tizen.csproj", "{5D4A2AF5-55E7-4C39-BD43-C058A23B9BA2}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "HybridMessageAppSample", "HybridMessageAppSample", "{A1CEA2C3-9558-4578-B22E-09109111BE1A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HybridMessageApp", "samples\HybridMessageApp\HybridMessageApp\HybridMessageApp.csproj", "{5271BA3E-E1DC-45D2-9162-BD6EB81FA5AE}"
Expand Down Expand Up @@ -162,6 +166,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HybridMsalAuthApp.macOS", "
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HybridMsalAuthApp.Windows", "samples\HybridMsalAuthSample\HybridMsalAuthApp.Windows\HybridMsalAuthApp.Windows.csproj", "{7F72AEB6-7077-4F58-A3EB-BC668E8EEECF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MobileBlazorBindingsHelloWorld.Tizen", "samples\MobileBlazorBindingsHelloWorld\MobileBlazorBindingsHelloWorld.Tizen\MobileBlazorBindingsHelloWorld.Tizen.csproj", "{56757A1F-C70F-440D-BCDB-46516754860B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HybridAuthApp.Tizen", "samples\HybridAuthSample\HybridAuthApp.Tizen\HybridAuthApp.Tizen.csproj", "{B906FB8F-704C-4367-8402-9352D69D0B4E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -488,6 +496,18 @@ Global
{69571F1B-D2C2-4152-A15D-F753397AFC16}.Release|iPhone.Build.0 = Release|Any CPU
{69571F1B-D2C2-4152-A15D-F753397AFC16}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{69571F1B-D2C2-4152-A15D-F753397AFC16}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{F4B0D8B4-B596-422D-BFD6-DBD43EC1075F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F4B0D8B4-B596-422D-BFD6-DBD43EC1075F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F4B0D8B4-B596-422D-BFD6-DBD43EC1075F}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{F4B0D8B4-B596-422D-BFD6-DBD43EC1075F}.Debug|iPhone.Build.0 = Debug|Any CPU
{F4B0D8B4-B596-422D-BFD6-DBD43EC1075F}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{F4B0D8B4-B596-422D-BFD6-DBD43EC1075F}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{F4B0D8B4-B596-422D-BFD6-DBD43EC1075F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F4B0D8B4-B596-422D-BFD6-DBD43EC1075F}.Release|Any CPU.Build.0 = Release|Any CPU
{F4B0D8B4-B596-422D-BFD6-DBD43EC1075F}.Release|iPhone.ActiveCfg = Release|Any CPU
{F4B0D8B4-B596-422D-BFD6-DBD43EC1075F}.Release|iPhone.Build.0 = Release|Any CPU
{F4B0D8B4-B596-422D-BFD6-DBD43EC1075F}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{F4B0D8B4-B596-422D-BFD6-DBD43EC1075F}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{01A7CEE6-B551-41CE-99F7-2C6B29566C9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{01A7CEE6-B551-41CE-99F7-2C6B29566C9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{01A7CEE6-B551-41CE-99F7-2C6B29566C9B}.Debug|iPhone.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -552,6 +572,18 @@ Global
{59D7D9FA-FD6A-4D7C-B20C-D82A9AEACC77}.Release|iPhone.Build.0 = Release|Any CPU
{59D7D9FA-FD6A-4D7C-B20C-D82A9AEACC77}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{59D7D9FA-FD6A-4D7C-B20C-D82A9AEACC77}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{5D4A2AF5-55E7-4C39-BD43-C058A23B9BA2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5D4A2AF5-55E7-4C39-BD43-C058A23B9BA2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5D4A2AF5-55E7-4C39-BD43-C058A23B9BA2}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{5D4A2AF5-55E7-4C39-BD43-C058A23B9BA2}.Debug|iPhone.Build.0 = Debug|Any CPU
{5D4A2AF5-55E7-4C39-BD43-C058A23B9BA2}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{5D4A2AF5-55E7-4C39-BD43-C058A23B9BA2}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{5D4A2AF5-55E7-4C39-BD43-C058A23B9BA2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5D4A2AF5-55E7-4C39-BD43-C058A23B9BA2}.Release|Any CPU.Build.0 = Release|Any CPU
{5D4A2AF5-55E7-4C39-BD43-C058A23B9BA2}.Release|iPhone.ActiveCfg = Release|Any CPU
{5D4A2AF5-55E7-4C39-BD43-C058A23B9BA2}.Release|iPhone.Build.0 = Release|Any CPU
{5D4A2AF5-55E7-4C39-BD43-C058A23B9BA2}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{5D4A2AF5-55E7-4C39-BD43-C058A23B9BA2}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{5271BA3E-E1DC-45D2-9162-BD6EB81FA5AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5271BA3E-E1DC-45D2-9162-BD6EB81FA5AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5271BA3E-E1DC-45D2-9162-BD6EB81FA5AE}.Debug|iPhone.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -921,6 +953,30 @@ Global
{7F72AEB6-7077-4F58-A3EB-BC668E8EEECF}.Release|iPhone.Build.0 = Release|Any CPU
{7F72AEB6-7077-4F58-A3EB-BC668E8EEECF}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{7F72AEB6-7077-4F58-A3EB-BC668E8EEECF}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{56757A1F-C70F-440D-BCDB-46516754860B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{56757A1F-C70F-440D-BCDB-46516754860B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{56757A1F-C70F-440D-BCDB-46516754860B}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{56757A1F-C70F-440D-BCDB-46516754860B}.Debug|iPhone.Build.0 = Debug|Any CPU
{56757A1F-C70F-440D-BCDB-46516754860B}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{56757A1F-C70F-440D-BCDB-46516754860B}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{56757A1F-C70F-440D-BCDB-46516754860B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{56757A1F-C70F-440D-BCDB-46516754860B}.Release|Any CPU.Build.0 = Release|Any CPU
{56757A1F-C70F-440D-BCDB-46516754860B}.Release|iPhone.ActiveCfg = Release|Any CPU
{56757A1F-C70F-440D-BCDB-46516754860B}.Release|iPhone.Build.0 = Release|Any CPU
{56757A1F-C70F-440D-BCDB-46516754860B}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{56757A1F-C70F-440D-BCDB-46516754860B}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{B906FB8F-704C-4367-8402-9352D69D0B4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B906FB8F-704C-4367-8402-9352D69D0B4E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B906FB8F-704C-4367-8402-9352D69D0B4E}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{B906FB8F-704C-4367-8402-9352D69D0B4E}.Debug|iPhone.Build.0 = Debug|Any CPU
{B906FB8F-704C-4367-8402-9352D69D0B4E}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{B906FB8F-704C-4367-8402-9352D69D0B4E}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{B906FB8F-704C-4367-8402-9352D69D0B4E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B906FB8F-704C-4367-8402-9352D69D0B4E}.Release|Any CPU.Build.0 = Release|Any CPU
{B906FB8F-704C-4367-8402-9352D69D0B4E}.Release|iPhone.ActiveCfg = Release|Any CPU
{B906FB8F-704C-4367-8402-9352D69D0B4E}.Release|iPhone.Build.0 = Release|Any CPU
{B906FB8F-704C-4367-8402-9352D69D0B4E}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{B906FB8F-704C-4367-8402-9352D69D0B4E}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -955,12 +1011,14 @@ Global
{3CECADBB-3E56-4D47-A313-CE9E43DCAB02} = {175AB6E2-5FB5-4C15-94C2-DCA2EE6B0703}
{5644B2A3-5B96-44D5-A244-4E7E450E2196} = {175AB6E2-5FB5-4C15-94C2-DCA2EE6B0703}
{69571F1B-D2C2-4152-A15D-F753397AFC16} = {175AB6E2-5FB5-4C15-94C2-DCA2EE6B0703}
{F4B0D8B4-B596-422D-BFD6-DBD43EC1075F} = {175AB6E2-5FB5-4C15-94C2-DCA2EE6B0703}
{0D2AAC54-5DE7-42F7-A839-1B2C550EE070} = {50192AAF-25B6-447A-99AA-BA8161DBB594}
{01A7CEE6-B551-41CE-99F7-2C6B29566C9B} = {0D2AAC54-5DE7-42F7-A839-1B2C550EE070}
{7147383D-8B55-44BA-A4E7-B01C875E33EE} = {0D2AAC54-5DE7-42F7-A839-1B2C550EE070}
{1EDA072C-07B1-41F7-BFAF-7782B0B09CA8} = {0D2AAC54-5DE7-42F7-A839-1B2C550EE070}
{FAFA9B0B-975F-4B2A-BE09-97386204399C} = {0D2AAC54-5DE7-42F7-A839-1B2C550EE070}
{59D7D9FA-FD6A-4D7C-B20C-D82A9AEACC77} = {0D2AAC54-5DE7-42F7-A839-1B2C550EE070}
{5D4A2AF5-55E7-4C39-BD43-C058A23B9BA2} = {0D2AAC54-5DE7-42F7-A839-1B2C550EE070}
{A1CEA2C3-9558-4578-B22E-09109111BE1A} = {50192AAF-25B6-447A-99AA-BA8161DBB594}
{5271BA3E-E1DC-45D2-9162-BD6EB81FA5AE} = {A1CEA2C3-9558-4578-B22E-09109111BE1A}
{067B3562-A60A-48CB-A917-4B7D9700120A} = {A1CEA2C3-9558-4578-B22E-09109111BE1A}
Expand Down Expand Up @@ -995,6 +1053,8 @@ Global
{D3B0F2E0-E1A6-4F9F-8B64-5EB147B1B817} = {EDBF7495-7557-457A-96FF-DB68D4B57C2F}
{84EBDBF2-0E83-4D20-BCEA-F00FF716F2F6} = {EDBF7495-7557-457A-96FF-DB68D4B57C2F}
{7F72AEB6-7077-4F58-A3EB-BC668E8EEECF} = {EDBF7495-7557-457A-96FF-DB68D4B57C2F}
{56757A1F-C70F-440D-BCDB-46516754860B} = {6EC09416-261E-48BD-848B-20CC98AC2CCA}
{B906FB8F-704C-4367-8402-9352D69D0B4E} = {06BC50C0-7882-4E96-8FEA-78B3872AE49D}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A645A7FF-3F09-414D-A391-7E50C3597F05}
Expand Down
20 changes: 20 additions & 0 deletions samples/HybridApp/HybridApp.Tizen/HybridApp.Tizen.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project Sdk="Tizen.NET.Sdk/1.1.5">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>tizen40</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\src\Microsoft.MobileBlazorBindings.WebView.Tizen\Microsoft.MobileBlazorBindings.WebView.Tizen.csproj" />
<ProjectReference Include="..\HybridApp\HybridApp.csproj" />
</ItemGroup>

<ItemGroup>
<None Update="res\wwwroot\index.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>

43 changes: 43 additions & 0 deletions samples/HybridApp/HybridApp.Tizen/Main.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

using System;
using System.IO;
using System.Reflection;
using Microsoft.MobileBlazorBindings.WebView.Elements;
using Microsoft.MobileBlazorBindings.WebView.Tizen;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Tizen;

[assembly: ExportRenderer(typeof(WebViewExtended), typeof(WebViewExtendedRenderer))]

namespace HybridApp.Tizen
{
class Program : FormsApplication
{
protected override void OnCreate()
{
base.OnCreate();
Directory.SetCurrentDirectory(Current.DirectoryInfo.Resource);
LoadApplication(new App());
}

static void Main(string[] args)
{
var app = new Program();

#if !TIZEN80
AppDomain.CurrentDomain.AssemblyResolve += (s, e) =>
{
var asmName = e.Name.Split(",")[0];
var dllPath = Path.Combine(app.ApplicationInfo.ExecutablePath, "../", asmName + ".dll");
return File.Exists(dllPath) ? Assembly.LoadFile(dllPath) : null;
};
#endif

BlazorHybridTizen.Init();
Forms.Init(app, true);
app.Run(args);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
color: #0366d6;
}

.btn-primary {
color: #fff;
background-color: #1b6ec2;
border-color: #1861ac;
}

app {
position: relative;
display: flex;
flex-direction: column;
}

.top-row {
height: 3.5rem;
display: flex;
align-items: center;
}

.main {
flex: 1;
}

.main .top-row {
background-color: #f7f7f7;
border-bottom: 1px solid #d6d5d5;
justify-content: flex-end;
}

.main .top-row > a, .main .top-row .btn-link {
white-space: nowrap;
margin-left: 1.5rem;
}

.main .top-row a:first-child {
overflow: hidden;
text-overflow: ellipsis;
}

.sidebar {
background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
}

.sidebar .top-row {
background-color: rgba(0,0,0,0.4);
}

.sidebar .navbar-brand {
font-size: 1.1rem;
}

.sidebar .oi {
width: 2rem;
font-size: 1.1rem;
vertical-align: text-top;
top: -2px;
}

.sidebar .nav-item {
font-size: 0.9rem;
padding-bottom: 0.5rem;
}

.sidebar .nav-item:first-of-type {
padding-top: 1rem;
}

.sidebar .nav-item:last-of-type {
padding-bottom: 1rem;
}

.sidebar .nav-item a {
color: #d7d7d7;
border-radius: 4px;
height: 3rem;
display: flex;
align-items: center;
line-height: 3rem;
}

.sidebar .nav-item a.active {
background-color: rgba(255,255,255,0.25);
color: white;
}

.sidebar .nav-item a:hover {
background-color: rgba(255,255,255,0.1);
color: white;
}

.content {
padding-top: 1.1rem;
}

.navbar-toggler {
background-color: rgba(255, 255, 255, 0.1);
}

.valid.modified:not([type=checkbox]) {
outline: 1px solid #26b050;
}

.invalid {
outline: 1px solid red;
}

.validation-message {
color: red;
}

#blazor-error-ui {
background: lightyellow;
bottom: 0;
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
display: none;
left: 0;
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
position: fixed;
width: 100%;
z-index: 1000;
}

#blazor-error-ui .dismiss {
cursor: pointer;
position: absolute;
right: 0.75rem;
top: 0.5rem;
}

@media (max-width: 767.98px) {
.main .top-row:not(.auth) {
display: none;
}

.main .top-row.auth {
justify-content: space-between;
}

.main .top-row a, .main .top-row .btn-link {
margin-left: 0;
}
}

@media (min-width: 768px) {
app {
flex-direction: row;
}

.sidebar {
width: 250px;
height: 100vh;
position: sticky;
top: 0;
}

.main .top-row {
position: sticky;
top: 0;
}

.main > div {
padding-left: 2rem !important;
padding-right: 1.5rem !important;
}

.navbar-toggler {
display: none;
}

.sidebar .collapse {
/* Never collapse the sidebar for wide screens */
display: block;
}
}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading