본문 바로가기

C#(CSharp)/WPF18

ObservableCollection 바인딩(Binding) ObservableCollection 을 이용해서 Binding 하는 방법에 대해서 소스를 중심으로 알아 보겠습니다. 1.Declare ObservableCollection 모델 Binding Classusing System;using System.ComponentModel;using System.Collections.ObjectModel;using System.Collections.Generic; namespace ObservableCollectionBinding.Binding{ public class OnePersonInfo : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; public virtual.. 2015. 4. 8.
결합 속성(?) Attached Property Dependency Property 중에 다른 하나인 Attached Property 를 정리해 봅니다. 1. Declare Attached Property Classusing System;using System.Linq;using System.Windows;using System.Windows.Controls; namespace SteveDependencyProperties.AttachedProperties{ /// /// AttachedProperty class declare /// public static class MyTestAttachedProperties { /// /// DependencyProperty.RegisterAttached /// public static readonly Depen.. 2015. 4. 8.
의존 속성(Dependency Object) WPF 중요 개념중에 하나인 Dependency Object에 대해서 xaml, cs 중심으로 알아 보겠습니다. 1. Declare DependencyObject Classusing System;using System.Diagnostics;using System.Linq;using System.Windows; namespace SteveDependencyProperties.DependencyProperties{ /// /// Inheritance DependencyObject Class /// public class MyTestDependencyObject : DependencyObject { /// /// Regist Dependency Object /// public static readonly De.. 2015. 4. 8.
사용자 정의 이벤트 만들기 [XAML] [CS]namespace CommonUserControl.CommonCtrl{ public class CustomEventCtrlArgs : RoutedEventArgs { public CustomEventCtrlArgs(RoutedEvent routedEvent, object source) : base(routedEvent, source) { } } /// /// Interaction logic for CustomEventUserControl.xaml /// public partial class CustomEventUserControl : UserControl { public static readonly RoutedEvent CustomCtrlEvent = EventManager.Regis.. 2015. 4. 8.