自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

WPF嵌入式資源相關(guān)概念介紹

開發(fā) 開發(fā)工具
WPF嵌入式資源的相關(guān)概念,在這篇文章中將會以一段代碼示例為大家詳細(xì)介紹。希望大家可以通過本文介紹的內(nèi)容得到幫助。

WPF開發(fā)工具的使用幫助我們實現(xiàn)了許多以前難以實現(xiàn)的圖形處理功能。我們在這里將會為大家介紹一下有關(guān)WPF嵌入式資源的相關(guān)概念。#t#

WPF嵌入式資源代碼示例:

  1. < Page x:Class="WpfWebApp.Page1" 
  2. xmlns="http://schemas.microsoft.
    com/winfx/2006/xaml/presentation"
     
  3. xmlns:uc="clr-namespace:
    WpfLibruary;assembly=WpfLibruary"
     
  4. xmlns:x="http://schemas.microsoft.
    com/winfx/2006/xaml"
     
  5. xmlns:local="clr-namespace:WpfWebApp" 
  6. Title="Page1" Height="332" 
    Width="757" VerticalAlignment="Top"> 
  7. < Page.Resources> 
  8. < local:PersonCollection x:Key="PersonC"> 
  9. < local:Person Id="1" Name="Cgc1" /> 
  10. < local:Person Id="2" Name="Cgc2" /> 
  11. < local:Person Id="3" Name="Cgc3" /> 
  12. < /local:PersonCollection> 
  13. < /Page.Resources> 
  14. < Grid Height="289"> 
  15. < TextBlock FontSize="24" 
    TextWrapping="Wrap" Margin=
    "0,0,0,-19.998"> 
  16. < Hyperlink x:Name="LnkPre" 
    NavigateUri="Page2.xaml" 
    Foreground="Black"> 
  17. Enter Page2  
  18. < /Hyperlink> 
  19. < /TextBlock> 
  20. < Button Margin="358,43,214,0" 
    Name="button1" Click="button1_Click" 
    Height="49.024" VerticalAlignment
    ="Top">Button< /Button> 
  21. < ListBox ItemsSource="{StaticResource 
    PersonC}"
     IsSynchronizedWithCurrentItem
    ="True" x:Name="LstPerson" 
    HorizontalAlignment="Left"
     Width="297" Height="131" 
    VerticalAlignment="Top"> 
  22. < ListBox.ItemTemplate> 
  23. < DataTemplate> 
  24. < DockPanel> 
  25. < TextBlock Text="{Binding 
    Path=Id}"
    >< /TextBlock> 
  26. < TextBlock Text="分分:">< /TextBlock> 
  27. < TextBlock Text="{Binding 
    Path=Name}"
    >< /TextBlock> 
  28. < /DockPanel> 
  29. < /DataTemplate> 
  30. < /ListBox.ItemTemplate> 
  31. < /ListBox> 
  32. < /Grid> 
  33. < /Page> 
  34. public class Person  
  35. {  
  36. public Person()  
  37. { }  
  38. public Person(Int32 Id, String Name)  
  39. {  
  40. this.Id = Id;  
  41. this.Name = Name;  
  42. }  
  43. public Int32 Id  
  44. {  
  45. get;  
  46. set;  
  47. }  
  48. public String Name  
  49. {  
  50. get;  
  51. set;  
  52. }  
  53. }  
  54. public class PersonCollection : 
    System.Collections.ObjectModel.
    ObservableCollection
    < Person> 
  55. {  

 

WPF嵌入式資源的相關(guān)概念就為大家介紹這里。

責(zé)任編輯:曹凱 來源: 博客園
相關(guān)推薦

2009-12-17 10:33:05

嵌入式Linux

2023-02-09 08:35:39

Spring嵌入式容器

2011-03-07 09:57:24

Perst嵌入式數(shù)據(jù)庫

2009-12-23 13:05:22

Linux嵌入式

2013-09-22 10:39:00

MeayunDB

2009-12-25 17:48:43

WPF資源路徑

2009-12-25 10:05:06

WPF資源

2009-12-23 15:27:34

WPF圖形系統(tǒng)

2009-12-28 15:18:29

WPF控件模型

2009-12-29 13:29:28

WPF Depende

2009-12-25 11:23:43

WPF命令模型

2009-12-28 16:20:50

WPF內(nèi)嵌樣式

2009-12-29 09:54:27

WPF文字布局

2009-06-11 11:09:02

Linux嵌入式開發(fā)環(huán)境

2011-01-14 13:13:23

嵌入式Linux開發(fā)

2009-04-22 17:18:29

PCB技術(shù)單片機

2009-12-23 17:18:45

WPF Attache

2011-01-14 13:05:25

Linux內(nèi)核嵌入式

2009-12-09 10:12:28

嵌入式Linux

2009-07-17 16:06:59

ARM嵌入式開發(fā)
點贊
收藏

51CTO技術(shù)棧公眾號