Top Banner

of 49

6804950-HardcoreWPF

Jun 04, 2018

Download

Documents

rrajankadam
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 8/14/2019 6804950-HardcoreWPF

    1/49

    Hardcore WPF(Windows Presentation

    Foundation)

    casey chesnut

    brains-N-brawn.com

    Madison .NET 11/!

    http://www.brains-n-brawn.com/http://www.brains-n-brawn.com/http://www.brains-n-brawn.com/
  • 8/14/2019 6804950-HardcoreWPF

    2/49

    "ource

    # Fundamenta$ demos

    % htt&'//www.brains-n-

    brawn.com/artiacts/HardcoreWPF.i&

    # /bac*+ow demo

    % htt&'//www.brains-N-brawn.com/bac*+ow/

  • 8/14/2019 6804950-HardcoreWPF

    3/49

  • 8/14/2019 6804950-HardcoreWPF

    4/49

    9:T46NE

    # 9,er,iew

    # Fundamenta$s % demos;

    # 2&&$ication Mode$s# /bac*+ow demo;

  • 8/14/2019 6804950-HardcoreWPF

    5/49

    9:T46NE ' 9,er,iew

  • 8/14/2019 6804950-HardcoreWPF

    6/49

    Now

    # WinForms

    # 7irect@ (11 years)> 7irect07

    # Auart> 7irect"how (B years)

    # Prob$ems

    % "howin their ae% Each 2P6 is dierent

    % MiCin 2P6s is cha$$enin

    Which o these ha,e

    you wor*ed with8

  • 8/14/2019 6804950-HardcoreWPF

    7/49

    NeCt

  • 8/14/2019 6804950-HardcoreWPF

    8/49

    WPF

    # om&ositin% :6> 7ocuments> Media> 07> 5rowser> D

    # 7ec$arati,e &rorammin with @2M4 mar*u&

    # For 7esiners and 7e,e$o&ers# +ewritten rom scratch

    % 5ui$t on to& o 7irect07

    % Hardware acce$erated

    % ector based% +eso$ution inde&endent (1/! inch)

    % +etained ra&hics

  • 8/14/2019 6804950-HardcoreWPF

    9/49

  • 8/14/2019 6804950-HardcoreWPF

    10/49

    P$atorms

    # ista

    # @P "P=

    # "er,er =0 "P1

    # +enders the same on each

    # +emote 7es*to& trans&ort

    # "ubsets o WPF (@P"> WPF/E) wi$$ ma*eit to other &$atorms

  • 8/14/2019 6804950-HardcoreWPF

    11/49

    Tiers

    # Tier = % 7irect@ > "hader =.> 1=B mes

    ,ideo ram (hardware renderin)

    # Tier 1 % 7irect@ > 0= mes ,ideo ram

    (miCed hw/sw renderin)

    # Tier % be$ow (sotware renderin)

    # 7eau$ts to ! &s

    # 2nti-a$iasin

  • 8/14/2019 6804950-HardcoreWPF

    12/49

    Time$ine

    # Pi$$ar o .NET 0.

    % $ass $ibraries bui$t on .NET =.

    % WPF> WF> WF> 6noard

    % Past +e$ease andidate

    % .NET 0.@ comin ater that

  • 8/14/2019 6804950-HardcoreWPF

    13/49

    6nsta$$ation

    # isua$ "tudio =3

    # .NET 0. (&re-insta$$ed with ista)

    %+untime

    # Windows "7I

    % M"5ui$d> @2M4Pad> sam&$es

    # 9rcas eCtension or " =3% isua$ desiner> schemas> &roJect tem&$ates

  • 8/14/2019 6804950-HardcoreWPF

    14/49

    Too$s

    # Windows "7I% @2M4Pad> Perorator> :6"&y> @P" onormance>

    W6EC&$orer

    # " =3

    % 9rcas ECtensions (beta)# E$ectric +ain Kam 07# Mobiorm 2urora# Microsot EC&ression

    % ider

    @2M4Pad

    Microsot EC&ression

    6nteracti,e 7esiner

  • 8/14/2019 6804950-HardcoreWPF

    15/49

    9:T46NE ' Fundamenta$s

    # @2M4> 2&&$ication> Na,iation> 4ayout>

    ontent> 7ata 5indin> 7e&endency

    Pro&erty> "ty$es> Tem&$ates> ontro$s>

    E,ents> "ha&es> 7ocuments> 6main>5itma&Eects> 2nimation> Media>

    5rushes> 07

    H $$ W $d@ $P

  • 8/14/2019 6804950-HardcoreWPF

    16/49

    @2M4

    # 7ec$arati,e obJect instantiation

    # Not eCc$usi,e to WPF

    # "e&arates :6 and $oic

    % ommon $anuae or 7esiners and 7e,e$o&ers

    % Para$$e$ de,e$o&ment

    % 4oca$iation> 5randin

    % Tareted :6 (de,ices> users> D)# Too$ su&&ort

    # "u&&orts L and 5.NET

    He$$oWor$d@am$Pae

    He$$oWor$dodePae

    " NET WPF

  • 8/14/2019 6804950-HardcoreWPF

    17/49

    2&&$ication

    # shutdown)# Na,iation"er,ice

    # Pro&erties co$$ection

    # "tartu&:ri

    ".NET WPF a&& rom

    scratch

    7ra7ro& ider contro$s

    rom Too$boC

    @ $" t

  • 8/14/2019 6804950-HardcoreWPF

    18/49

    @2M4

    # 9bJect e$ements> 2ttribute syntaC

    # Pro&erty e$ements> 2bbre,iated syntaC

    # ontent syntaC

    # 2ttached &ro&erties> 2ttached e,ents

    # Mar*u& eCtensions% 5indin syntaC> +esource syntaC

    # @m$ Names&aces

    # ode-behind ,s 6n$ine ,s ode-on$y

    @am$"yntaC

  • 8/14/2019 6804950-HardcoreWPF

    19/49

    htt //$ $h t/P N i ti /P N i ti b

    http://localhost/PageNavigation/PageNavigation.xbaphttp://localhost/PageNavigation/PageNavigation.xbaphttp://localhost/PageNavigation/PageNavigation.xbap
  • 8/14/2019 6804950-HardcoreWPF

    20/49

    Na,iation

    # Na,iationWindow and Frame

    # Hy&er$in*

    # Na,iation"er,ice# :+6> rament su&&ort

    # E,ents

    # ourna$# PaeFunctions

    htt&'//$oca$host/PaeNa,iation/PaeNa,iation.Cba&

    http://localhost/PageNavigation/PageNavigation.xbaphttp://localhost/PageNavigation/PageNavigation.xbaphttp://localhost/PageNavigation/PageNavigation.xbap
  • 8/14/2019 6804950-HardcoreWPF

    21/49

    E,ents

    # +outedE,ents

    % Tunne$in (Pre,iew) and 5ubb$in

    # E$ementTree

    # "ty$us su&&ort or Tab$et Ps

    # 2ttach hand$er in @2M4 or ode

    # "ty$es/Tem&$ates can hand$e e,ents# 5ind to e$ement with Name or C'Name

    Pane$4ayout

  • 8/14/2019 6804950-HardcoreWPF

    22/49

    4ayout

    # 7ynamic siin and &ositionin

    # Pane$s are *ey

    % "tac*Pane$> 7oc*Pane$> Wra&Pane$> an,as> D

    # 2$inment% "tretch ("ie to container)

    % 4et> +iht> enter ("ie to content)

    # Marin (&arent) and Paddin (content)# 9,er$ow

    % $i&> Wra&> "cro$$> "ca$e

    Pane$4ayout

    Too$Ti&

  • 8/14/2019 6804950-HardcoreWPF

    23/49

    ontent

    # +ich ontent

    % ontentontro$

    % Headeredontentontro$

    % 6temsontro$

    % Headered6temsontro$

    Too$Ti&

    6ntero&WinForm

  • 8/14/2019 6804950-HardcoreWPF

    24/49

    6ntero&

    # Hwnd"ource> HwndHost

    # 6ntero&s with WinForms> Win0=> 7irect@>

    D

    # 2cti,e@ intero& is throuh WinForms

    intero&

    #annot share airs&ace> so com&ositinwi$$ not wor*

    6ntero&WinForm

    TwoWay5indin

  • 8/14/2019 6804950-HardcoreWPF

    25/49

    7ata 5indin

    # 7ata mode$s ' @M4> 9bJects> 7ata"ets>WF> 46NA> D

    # 5indin syntaC

    # 7e&endencyPro&erty

    # 7ataonteCt> 7ataTem&$ate

    # 6NotiyPro&ertyhaned>

    6Notiyo$$ectionhaned# Modes ' 9neTime> 9neWay> TwoWay>

    9neWayTo"ource

    TwoWay5indin

  • 8/14/2019 6804950-HardcoreWPF

    26/49

    7e&endencyPro&erty

    # a$ue de&ends on some other &ro&erty

    % :ser or 7ata5indin> "ty$es> 2nimation> D

    # a$idation

    # 6nheritance

    # 2ttachedPro&erties

    # 7eau$t ,a$ues

    "ty$ed5utton

  • 8/14/2019 6804950-HardcoreWPF

    27/49

    "ty$es

    # "imi$ar to ""

    # +esources

    # "etters# Triers

    # 6nheritance

    # D Tem&$ates# D 2nimation

    "ty$ed5utton

    Tem&$ate5utton

  • 8/14/2019 6804950-HardcoreWPF

    28/49

    Tem&$ates

    # ontro$s are bui$t based on their

    unctiona$ity

    # The deau$t tem&$ate can be chaned to

    radica$$y chane how the contro$ renders

    # The oa$ is to a,oid ha,in to create user

    drawn contro$s

    Tem&$ate5utton

    " NET Too$boC

  • 8/14/2019 6804950-HardcoreWPF

    29/49

    ontro$s

    # omes with a set o standard set o

    common contro$s or :6

    # :serontro$

    % "im&$e reusab$e contro$

    % "imi$ar to a&&$ication de,e$o&ment

    # ontro$

    % Pro,ides tem&$atin

    % For reuse between many a&&$ications

    ".NET Too$boC

    "ha&es

  • 8/14/2019 6804950-HardcoreWPF

    30/49

    "ha&es

    # =7

  • 8/14/2019 6804950-HardcoreWPF

    31/49

    7ocuments

    # F$ow ,s FiCed (@P")

    # Pac*ain

    # 7ocument ,iewin

    # Ty&ora&hy

    % $earTy&e

    % 9&enFont

    % Font can be de&$oyed with an 2&&$ication# Printin

    # 2nnotatin

    F$ow7ocument

    Fi$e % Print - @P"

  • 8/14/2019 6804950-HardcoreWPF

    32/49

    5itma&Eect

  • 8/14/2019 6804950-HardcoreWPF

    33/49

    5itma&Eect

    # 2&&$ied to isua$s

    # an be chained

    # 5$ur# 9uter

  • 8/14/2019 6804950-HardcoreWPF

    34/49

    2nimation

    # 7e&endency Pro&erties

    # 2nimation Ty&es ' 7oub$e> o$or> "trin>

    Point> 6nt0=> Path> D

    # Tarets ' From> To> 5y

    # Time based ' duration> re&etition> start

    times> D# "toryboards ' &ausin> sto&&in> resume

    # Iey-Frame su&&ort

    2nimated5utton

    Media6n*

  • 8/14/2019 6804950-HardcoreWPF

    35/49

    Media

    # 2udio

    # ideo

    5rushes

  • 8/14/2019 6804950-HardcoreWPF

    36/49

    5rushes

    # "o$ido$or5rush

    #

  • 8/14/2019 6804950-HardcoreWPF

    37/49

    07

    # 5asic 07 "u&&ort

    # iew&ort07

    # ameras

    # Mode$s# Materia$s

    # 4ihts

    # Transorms

    # Hit Testin

    # 2nimations

  • 8/14/2019 6804950-HardcoreWPF

    38/49

    9:T46NE ' 2&& Mode$s

    # 4oose @2M4

    # Windows 2&&$ication

    # @52P / W52# WPF/E

    # @P"

  • 8/14/2019 6804950-HardcoreWPF

    39/49

  • 8/14/2019 6804950-HardcoreWPF

    40/49

    2&&$ications

    # Windows a&&$ication

    # E@E with a Window or Na,iationWindow

    # 6nsta$$ed# 9$ine and 9n$ine

    # Fu$$ access

  • 8/14/2019 6804950-HardcoreWPF

    41/49

    @52P / W52

    # Hosted in a browser> 6E! and abo,e

    % 9ther browsers> FireFoC with a &$uin

    # 9n$ine on$y

    # 6nternet one &ermissions

    # Embed in web&ae usin 6Frame

    % annot interact with hostin &ae# Media enter> "idebar

  • 8/14/2019 6804950-HardcoreWPF

    42/49

    WPF/E

    # Mu$ti&$e browsers

    % 5rowsers 6E3.3?> Moi$$a> FireoC> 9&era>

    "aari

    # Mu$ti&$e &$atorms

    % M" ' Win=I?> M2 9" @ 1

    % 0rd&arty ' 4inuC> "o$aris

    # Mu$ti&$e de,ices

    % 7es*to&> PP> "P

  • 8/14/2019 6804950-HardcoreWPF

    43/49

    WPF/E

    # "ubset o WPF e.. no 07

    # "hootin or = me runtime insta$$

    # 9bJect ta or embeddin in HTM4# WPF ? "cri&t> 64

    # Pub$ic beta bits are $ate (A0 !)> browser

    re$ease (1st

    ha$ )> de,ice su&&ort (=nd

    ha$ )

  • 8/14/2019 6804950-HardcoreWPF

    44/49

  • 8/14/2019 6804950-HardcoreWPF

    45/49

    9:T46NE ' /bac*+ow 7emo

    # brains-N-brawn.com/bac*+ow/

    http://www.brains-n-brawn.com/backRow/http://www.brains-n-brawn.com/backRow/http://www.brains-n-brawn.com/backRow/http://www.brains-n-brawn.com/backRow/
  • 8/14/2019 6804950-HardcoreWPF

    46/49

    +esources

    # 5oo*s

    %2&&$ications O ode ? Mar*u&

    % Prorammin Windows Presentation Foundation

    % @2M4 in a Nutshe$$# Forum

    Windows Presentation Foundation (2,a$onG)

    # Newsrou&microsot.&ub$ic.windows.de,e$o&er.winC.a,a$on

    http://www.amazon.com/gp/product/0735619573/ref=pd_rvi_gw_2/002-5650645-3008864http://www.amazon.com/Programming-Windows-Presentation-Foundation-Chris/dp/0596101139/ref=pd_sim_b_1/002-5650645-3008864http://www.amazon.com/gp/product/0596526733/ref=pd_rvi_gw_1/002-5650645-3008864http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=119&SiteID=1http://groups.google.com/group/microsoft.public.windows.developer.winfx.avalon?lnk=sghttp://groups.google.com/group/microsoft.public.windows.developer.winfx.avalon?lnk=sghttp://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=119&SiteID=1http://www.amazon.com/gp/product/0596526733/ref=pd_rvi_gw_1/002-5650645-3008864http://www.amazon.com/Programming-Windows-Presentation-Foundation-Chris/dp/0596101139/ref=pd_sim_b_1/002-5650645-3008864http://www.amazon.com/gp/product/0735619573/ref=pd_rvi_gw_2/002-5650645-3008864
  • 8/14/2019 6804950-HardcoreWPF

    47/49

    +esources

    # Webcasts

    htt&'//sessions.miC!.com

    # e4earnin

    7e,e$o&in +ich EC&eriences with MicrosotQ .N

    # "am&$es

    'RProramFi$esRMicrosotR"7IsRWindowsR,!.R"am&$esRWPF"a

    m&$es.i&

    http://sessions.mix06.com/https://www.microsoftelearning.com/eLearning/offerDetail.aspx?offerPriceId=109340https://www.microsoftelearning.com/eLearning/offerDetail.aspx?offerPriceId=109340http://sessions.mix06.com/
  • 8/14/2019 6804950-HardcoreWPF

    48/49

    +esources

    # "ites

    % htt&'//w&.netC0.com/

    % WPF Windows "7I 7ocumentation

    % My Fi,e 7ay ourse For Hittin the WPF u

    % www.brains-N-brawn.com/bac*+ow/

    http://wpf.netfx3.com/http://windowssdk.msdn.microsoft.com/en-us/library/ms754130.aspxhttp://blogs.msdn.com/karstenj/archive/2006/06/15/my-five-day-course-for-hitting-the-wpf-curve-cliff.aspxhttp://www.brains-n-brawn.com/backRow/http://www.brains-n-brawn.com/backRow/http://blogs.msdn.com/karstenj/archive/2006/06/15/my-five-day-course-for-hitting-the-wpf-curve-cliff.aspxhttp://windowssdk.msdn.microsoft.com/en-us/library/ms754130.aspxhttp://wpf.netfx3.com/
  • 8/14/2019 6804950-HardcoreWPF

    49/49

    Auestions