SlideShare a Scribd company logo
XAML&Application Platform
~これまでとこれから~
高橋 忍
日本マイクロソフト株式会社
テクニカルエバンジェリスト
本日の内容
XAML&Application Platform ~これまでとこれから~
XAML
eXtensible Application Markup Language
本当にやりたかったこと
あらゆるデバイスでの快適なUX
UIとコードの分離&非同期処理
UI要素の再定義とユーザーへの開放
XAMLの役割
こう書くためのものw
class MainWindow : Window
{
private Button helloWorldButton;
private void InitializeComponent()
{
this.Title = "MainWindow";
this.Height = 350;
this.Width = 525;
this.helloWorldButton = new Button
{
Content = "Hello world",
HorizontalAlignment = HorizontalAlignment.Left,
VerticalAlignment = VerticalAlignment.Top,
Margin = new Thickness(10, 10, 0, 0),
Width = 100
};
this.helloWorldButton.Click += helloWorldButton_Click;
var grid = new Grid();
grid.Children.Add(this.helloWorldButton);
this.Content = grid;
}
:
}
<Window x:Class=“HelloWorld.MainWindow“
xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation
xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml
Title=”MainWindow” Height=“350” Width=“525”>
<Grid>
<Button x:Name=“helloWorldButton“
Content=”Hello world“
HorizontalAlignment=”Left“
Margin=”10,10,0,0“
VerticalAlignment=”Top“
Width=”100“
Click=”helloWorldButton_Click”/>
</Grid>
</Window>
オブジェクトのインスタンス化
public class Person
{
public string name { get; set; }
public bool bMan { get; set; }
public int nCats { get; set; }
}
<Person name=“Shinobu" bMan=“True“ nCats="4"/>
Person shinobu = new Person
{
name =“Shinobu”,
bMan = True;
nCats = 4
};
XAML とは
UIを定義するために特化した言語
…. ではなく
XAML とは
オブジェクトのインスタンスと
オブジェクト間の階層構造
を構築する定義型言語
XAML XML要素でのオブジェクト要素表現
Elements = CLR オブジェクトのインスタンス
Attribute=CLR オブジェクトのプロパティ / イベント
Content= CLR オブジェクトのプロパティ
<Button Click="showUpdatesButton-Click">
Show updates
</Button>
XAML化の副産物
Collections コレクション要素の匿名化
Ilist, Idictionary, and Arrays Collection + Conetnt
<Rectangle Width="200" Height="100">
<Rectangle.Fill>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="Yellow" Offset="0.0" />
<GradientStop Color="Red" Offset="0.25" />
<GradientStop Color="Blue" Offset="0.75" />
<GradientStop Color="LimeGreen" Offset="1.0" />
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
<StackPanel>
<Button> Button 1</Button>
<Button> Button 2</Button>
<Button> Button 3</Button>
<StackPanel>
XAML化の副産物
TypeConverters
Color
Thickness
Enumerators
Uri
Point
<Grid Background="White" Margin="200,100">
<Border Background="LightBlue"
BorderThickness="2" Padding="15">
<Image Source=“cats.jpg”
Stretch="UniformToFill"/>
</Border>
</Grid>
動的な処理をこっそり行いたい
Binding+DependencyProperty
Converter
独自の型変換を行うオブジェクトをバインド時に利用
ViewState とTrigger
複数のコンテンツを用意し条件で切り替え
StoryBoard
アニメーションとは特定のパラメーターをタイムラインで変化させる機能
MarkupExtension
クラスインスタンスの動的な拡張をXAMLで定義可能に
<Button Context=“{Binding name}”/>
Converter を使った型変換
<TextBlock Text="Sample Text" Visibility="{Binding ElementName=check1,
Path=IsChecked, Converter={StaticResource BoolVisibilityConverter}}" />
public class BoolVisibilityConverter : IValueConverter
{
public object Convert(object value, Type targetType, ….
{
return ((bool?)value == true) ? Visibility.Visible : Visibility.Hidden;
}
public object ConvertBack(object value, Type targetType, ….
{
throw new NotImplementedException();
}
}
VisualStateで動的な切り替え
<VisualState.Setters>
<Setter Target="splitView.DisplayMode" Value="Inline" />
</VisualState.Setters>
<VisualState.StateTriggers>
<AdaptiveTrigger MinWindowWidth="720" />
</VisualState.StateTriggers>
<VisualState.Setters>
<Setter Target="splitView.DisplayMode" Value="Overlay" />
</VisualState.Setters>
<VisualState.StateTriggers>
<AdaptiveTrigger MinWindowWidth= "0" />
</VisualState.StateTriggers>
UI要素の再定義とユーザーへの開放
新しいUI要素でのコントロール再定義
多彩な表現が可能に
テンプレートやスタイルによる拡張
ユーザーが0からデザインを再定義可能に
基本のプロパティの継承も可能
Content Propertyによる自由度
<Button>
<Image Source="bomb.jpg“/>
</Button>
XAMLのマルチプラットフォーム
VB/C#/C++
XAML
XAMLはクロスプラットフォームの世界へ
言語としての新たな可能性へ
XAML&Application Platform ~これまでとこれから~
2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017
Windows の変遷
GDI から
Direct Xへ
WDDM
マルチデバイス化
UXの多様化
Windows Vista
ディスプレイドライバーモデルの変更
XPDM(Windows XP display Driver Model)から
WDDM (Windows Display Driver Model) へ
デスクトップウィンドウマネージャー (DWM)
GDI アプリのエミュレーションと合成
Emulation
By DWM
Windows 8.1
ピクセル密度の概念
画面のスケーリングが解像度に合わせてデフォルトで変更
100%、140%,180%
論理解像度と物理解像度の考え方
マルチデバイスへの対応
タッチ・ペンを中心とした操作(キーボードレス、マウスレス)
極端の異なる画面のサイズと方向(4インチから40インチまで)
低パフォーマンスのデバイスでの動作
2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017
Windows Application Platform
2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017
Windows Application Platform
XAML
コード分離
Rich Web
Multi Device
XAML を使ったアプリの系譜
2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017
2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017
新たなる刺客 Xamarin.Forms
Xamarin
Rich Web
Multi DeviceXAML
コード分離
2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017
生き残った3つのテクノロジ
Windows Form
Xamarin
XAML ベースアプリの対応OSと問題
WPF
Windows 7 / Windows 8.x / Windows 10 Desktop
UWP
Windows 10 Desktop / Desktop / Mobile / Team / XBOX / IoT / Holographic
Xamarin Forms
iOS / Android / Windows Phone 8.x
Windows 10 Desktop / Desktop / Mobile / Team / XBOX / IoT / Holographic
XAML の標準化
XAML Standard による標準化
XAML Standard で統一される XAML
<!– Xamarin.Forms -->
<ContentView>
<StackLayout StackOrientation=“Vertical”
Spacing=“5”>
<Label Text=“Hello World!”
HorizontalOptions=“Center” />
<Button Text=“Click me!”
Command=“{Binding ClickCommand}” />
<Entry Placeholder=“Enter some text”
PlaceholderColor=“Blue” />
</StackLayout>
</ContentView>
<!-- UWP XAML -->
<UserControl>
<StackPanel Orientation=“Vertical”>
<TextBlock Text=“Hello World!”
HorizontalAlignment=“Center” />
<Button Content=“Click me!”
Command=“{Binding ClickCommand}” />
<TextBox
PlaceholderText=“Enter some text” />
</StackPanel>
</UserControl>
XAML Standard で統一される XAML
<!– Xamarin.Forms -->
<ContentView>
<StackLayout StackOrientation=“Vertical”
Spacing=“5”>
<Label Text=“Hello World!”
HorizontalOptions=“Center” />
<Button Text=“Click me!”
Command=“{Binding ClickCommand}” />
<Entry Placeholder=“Enter some text”
PlaceholderColor=“Blue” />
</StackLayout>
</ContentView>
<!-- UWP XAML -->
<UserControl>
<StackPanel Orientation=“Vertical”>
<TextBlock Text=“Hello World!”
HorizontalAlignment=“Center” />
<Button Content=“Click me!”
Command=“{Binding ClickCommand}” />
<TextBox
PlaceholderText=“Enter some text” />
</StackPanel>
</UserControl>
<!-- XAML Standard -->
<UserControl>
<StackPanel Orientation=“Vertical”
Spacing=“5” >
<TextBlock Text=“Hello World!”
HorizontalAlignment=“Center” />
<Button Content=“Click me!”
Command=“{Binding ClickCommand}” />
<TextBox PlaceholderText=“Enter some text”
PlaceholderBrush=“Blue”/>
</StackPanel>
</UserControl>
2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017
XAML の標準化はUWPとXamarin.Formsだけ
XAML Standard による標準化
2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017
新しい技術はUWPに投資
Fluent Design System
New Devices Full Support
(Ink Canvas, Surface Dial etc)
?
?
?
XAML を使ったアプリの将来予測
2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020
現実的な観点で見た将来への推移推測
Application with UI
Mobile : Xamarin
Mixed Reality :UWP
Web : HTML5
Windows UI : WPF, WinForm
Application with non-UI
UWP(IoT)
Linux
2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017
おまけ:Windows Application Platform
Windows Form
Xamarin
XAML&Application Platform ~これまでとこれから~
XAML&Application Platform ~これまでとこれから~
ホログラム式 (透過型)
没入型 (非透過型)
今日の VR今日の AR
物理現実 デジタル現実複合現実 (MR)
XAML&Application Platform ~これまでとこれから~
XAML&Application Platform ~これまでとこれから~
Windows Mixed Reality Devices
Immersive headsets
Powered by
Windows Mixed Reality
XAML&Application Platform ~これまでとこれから~
XAML&Application Platform ~これまでとこれから~
XAML&Application Platform ~これまでとこれから~
XAML&Application Platform ~これまでとこれから~
XAML&Application Platform ~これまでとこれから~
XAML&Application Platform ~これまでとこれから~
Introduction to
Microsoft Fluent Design System
Depth Motion Material ScaleLight
Fluent Design System
Reveal Highlight
<!-- For opt-in control scenarios, simply apply the appropriate Reveal style -->
<Button
Width="200“
Height="60“
Style="{ThemeResource ButtonRevealStyle}“
Content="Reveal Button“
Margin="5“
/>
Acrylic
<Rectangle Fill="{ThemeResource
SystemControlAcrylicWindowBrush}"/>
<Rectangle Fill="{ThemeResource
SystemControlChromeHighAcrylicWindowMediumBrush}"/>
<Rectangle Fill="{ThemeResource
SystemControlAcrylicElementAccentMediumHighBrush}"/>
ParallaxView
<WinUI:ParallaxView Source="{x:Bind TrackListView}” VerticalShift="100">
<Image x:Name="BackgroundImage" Source="Assets/background.png“ Stretch="UniformToFill"/>
</WinUI:ParallaxView>
<ListView x:Name=“TrackListview”>
...
</ListView>
や、やっと終わりか…
まとめ
現在のMicrosoft の中で
2DアプリのUIはXAMLとHTMLへ
XAMLは次の世代にむけて
マルチプラットフォーム・マルチデバイスのための
アプリのための言語として
進化を続けます
© 2017 Microsoft Corporation. All rights reserved.
本情報の内容(添付文書、リンク先などを含む)は、作成日時点でのものであり、予告なく変更される場合があります。

More Related Content

PDF
Xamarin de:code セッション:Windows Phone / iOS / Android アプリ同時開発のススメ
PPTX
Xamarin ~ iOS/Android/Windows アプリを C# で作ろう~
PDF
Xamarin 概要 2015年5月版
PPTX
Windows formsアプリケーション開発経験者のためのWPF開発のポイント集
PDF
「クロスプラットフォーム開発×XAML」というパワーワードを真剣に考える
PPTX
XAMLで業務アプリがこんなに変わる!デザイン志向による業務アプリの事例紹介
PDF
Angularを使ったエンタープライズWebアプリケーション開発の問題と解決策
Xamarin de:code セッション:Windows Phone / iOS / Android アプリ同時開発のススメ
Xamarin ~ iOS/Android/Windows アプリを C# で作ろう~
Xamarin 概要 2015年5月版
Windows formsアプリケーション開発経験者のためのWPF開発のポイント集
「クロスプラットフォーム開発×XAML」というパワーワードを真剣に考える
XAMLで業務アプリがこんなに変わる!デザイン志向による業務アプリの事例紹介
Angularを使ったエンタープライズWebアプリケーション開発の問題と解決策

Similar to XAML&Application Platform ~これまでとこれから~ (20)

PPTX
20171108 Tech Summit 2017 最新! Windows 10 Fall Creators Update 新機能とアプリケーション開発
PPTX
Xamarin.Forms.WPF を試してみた
PDF
Xamarin 概要 2014年08月版
PPTX
ADC MEETUP 03 HTML5でユーザビリティを高めるためのフォーム構築法
PDF
Webフロントエンド開発の最新トレンド - HTML5, モバイル, オフライン
PDF
MTセミナー2011/2/21 アイデアマンズ株式会社
PDF
2022.04.23 .NET 6 -7 時代のデスクトップ アプリケーション開発
PDF
Internet Explorer 9 の新機能「固定サイト」 (Pinned sites)
PDF
レスポンシブWebデザイン【発展編】
PPTX
Windows 8時代のアプリ開発
PDF
jQuery Mobile(開発編)勉強会資料
PDF
Webに今求められているレベル: HTML5 コントロールを利用した開発
PDF
Net advantage 2012 volume2 最新情報 xaml プラットフォーム編
PDF
Xamarin.Forms概要
PPTX
Web リソースを活用した簡単アプリケーション開発(Windows Phone)
PDF
Windows Phone / iOS / Android アプリ同時開発のススメ
PDF
Windows phone & windows 8で見えてくるメトロの世界
PDF
Ajax basic
PDF
Pf部2012年1月勉強会.androidsola
PPTX
2012 05-19第44回cocoa勉強会発表資料
20171108 Tech Summit 2017 最新! Windows 10 Fall Creators Update 新機能とアプリケーション開発
Xamarin.Forms.WPF を試してみた
Xamarin 概要 2014年08月版
ADC MEETUP 03 HTML5でユーザビリティを高めるためのフォーム構築法
Webフロントエンド開発の最新トレンド - HTML5, モバイル, オフライン
MTセミナー2011/2/21 アイデアマンズ株式会社
2022.04.23 .NET 6 -7 時代のデスクトップ アプリケーション開発
Internet Explorer 9 の新機能「固定サイト」 (Pinned sites)
レスポンシブWebデザイン【発展編】
Windows 8時代のアプリ開発
jQuery Mobile(開発編)勉強会資料
Webに今求められているレベル: HTML5 コントロールを利用した開発
Net advantage 2012 volume2 最新情報 xaml プラットフォーム編
Xamarin.Forms概要
Web リソースを活用した簡単アプリケーション開発(Windows Phone)
Windows Phone / iOS / Android アプリ同時開発のススメ
Windows phone & windows 8で見えてくるメトロの世界
Ajax basic
Pf部2012年1月勉強会.androidsola
2012 05-19第44回cocoa勉強会発表資料
Ad

More from Developer Solutions事業部 メシウス株式会社 (旧グレープシティ株式会社) (20)

PDF
SPAを選択した理由とその結果 ~Reactを添えて~
PDF
グレープシティ製品からみるSPA開発のトレンドと動向
PDF
日常使っているツールを調べる ー Visual Studio Code について ー
PDF
[GrapeCity Web TECH FORUM 2018]レガシーからの移行 - 株式会社日本プロテック
PDF
[GrapeCity Web TECH FORUM 2018]グレープシティJavaScript製品のご紹介 活用のコツと開発のポイント
PDF
グレープシティと業務システム開発のモダナイゼーション
PDF
Toolsの杜 - 富士通九州システムズ&グレープシティ -「これまでの業務アプリケーションはどうなる?」
PDF
Toolsの杜 - ランチセッションB - HTML5時代の業務アプリケーション開発にマッチ!グレープシティ JavaScript製品のご紹介
PDF
Toolsの杜- 弥生株式会社の自動仕訳エンジンを支えるフロントエンド ~ 「ダサいは、バグだ!」を標榜してUXを徹底的に追求する ~
PDF
Toolsの杜 - ランチセッションA - Microsoftの開発環境の変遷とグレープシティの.NET開発支援コンポーネントの最新動向
PDF
Toolsの杜 - マーベリック - 「IT×デザイン」のススメ
PDF
Excel業務をWebアプリに!コンポーネントベンダーが眺めたフロントエンド開発
PDF
グレープシティのMicrosoft Azure対応への取り組み
PDF
進化する帳票開発ツール「ActiveReports」の最新機能のご紹介
SPAを選択した理由とその結果 ~Reactを添えて~
グレープシティ製品からみるSPA開発のトレンドと動向
日常使っているツールを調べる ー Visual Studio Code について ー
[GrapeCity Web TECH FORUM 2018]レガシーからの移行 - 株式会社日本プロテック
[GrapeCity Web TECH FORUM 2018]グレープシティJavaScript製品のご紹介 活用のコツと開発のポイント
グレープシティと業務システム開発のモダナイゼーション
Toolsの杜 - 富士通九州システムズ&グレープシティ -「これまでの業務アプリケーションはどうなる?」
Toolsの杜 - ランチセッションB - HTML5時代の業務アプリケーション開発にマッチ!グレープシティ JavaScript製品のご紹介
Toolsの杜- 弥生株式会社の自動仕訳エンジンを支えるフロントエンド ~ 「ダサいは、バグだ!」を標榜してUXを徹底的に追求する ~
Toolsの杜 - ランチセッションA - Microsoftの開発環境の変遷とグレープシティの.NET開発支援コンポーネントの最新動向
Toolsの杜 - マーベリック - 「IT×デザイン」のススメ
Excel業務をWebアプリに!コンポーネントベンダーが眺めたフロントエンド開発
グレープシティのMicrosoft Azure対応への取り組み
進化する帳票開発ツール「ActiveReports」の最新機能のご紹介
Ad

XAML&Application Platform ~これまでとこれから~