かずきのBlog@hatena

すきな言語は C# + XAML の組み合わせ。Azure Functions も好き。最近は Go 言語勉強中。日本マイクロソフトで働いていますが、ここに書いていることは個人的なメモなので会社の公式見解ではありません。

流れメモ

XAML

伝えたいポイント

  • オブジェクト構築の言語
  • プロパティ要素の構文
    • Window.Content等
  • XAMLコンテンツ構文
    • ContentPropertyAttribute
  • 添付プロパティ
  • マークアップ拡張
    • {x:StaticResource xxxxxx}

DependencyObject

伝えたいポイント

  • WPF/SLのコントロールのルートに位置する型
  • 独自のプロパティシステムとイベントを構築

基本的なコントロール

伝えたいポイント
ContentControlとItemsControlを覚える

  • ContentControl
    • ButtonやWindowなどの単一要素を持つコントロール
    • Contentプロパティ : object
    • 変換ルール
      • ContentTemplate適用
      • Contentの型のDataTemplate
      • UIElement
      • ToString + TextBlock
  • ItemsControl
    • 複数要素を表示するコントロール
    • ListBox
    • ComboBox
    • TabControl
    • TreeView
    • ContextMenu
    • Menu
    • StatusBar
  • その他
    • Rectangle
    • TextBlock
    • TextBox
    • etc...

Binding

伝えたいポイント

  • DependencyPropertyと任意のオブジェクトのプロパティの同期
  • Binding Target - Binding Source
  • Mode, UpdateSourceTrigger
  • INotifyPropertyChanged, INotifyCollectionChanged

デモ

  • もんもんと考える。その場のノリ?