Dreamine.UI.Wpf.Controls 1.0.1
Dreamine.UI.Wpf.Controls 사용자 인터페이스 기능과 구성 요소를 제공합니다.
로딩중...
검색중...
일치하는것 없음
Dreamine.UI.Wpf.Controls.DreamineTextBlock 클래스 참조

더 자세히 ...

Dreamine.UI.Wpf.Controls.DreamineTextBlock에 대한 상속 다이어그램 :
Dreamine.UI.Wpf.Controls.DreamineTextBlock에 대한 협력 다이어그램:

정적 Public 멤버 함수

static void SetCommandTriggerName (DependencyObject obj, string value)
static string GetCommandTriggerName (DependencyObject obj)
static void SetCommand (DependencyObject obj, ICommand value)
static ICommand GetCommand (DependencyObject obj)
static void SetCommandParameter (DependencyObject obj, object value)
static object GetCommandParameter (DependencyObject obj)

정적 Public 속성

static readonly DependencyProperty CommandProperty
static readonly DependencyProperty CommandParameterProperty
static readonly DependencyProperty CommandTriggerNameProperty

정적 Private 멤버 함수

static DreamineTextBlock ()
static void OnCommandChanged (DependencyObject d, DependencyPropertyChangedEventArgs e)
static void TryExecuteCommand (DependencyObject d, string eventName, RoutedEventArgs eventArgs)

상세한 설명

전용 스타일과 입력 이벤트 기반 연결 명령을 제공하는 사용자 지정 텍스트 블록입니다.

DreamineTextBlock.cs 파일의 15 번째 라인에서 정의되었습니다.

생성자 & 소멸자 문서화

◆ DreamineTextBlock()

Dreamine.UI.Wpf.Controls.DreamineTextBlock.DreamineTextBlock ( )
inlinestaticprivate

기본 스타일 키를 재정의하고 텍스트 블록 테마 리소스를 병합합니다.

DreamineTextBlock.cs 파일의 25 번째 라인에서 정의되었습니다.

26 {
27 DefaultStyleKeyProperty.OverrideMetadata(typeof(DreamineTextBlock),
28 new FrameworkPropertyMetadata(typeof(DreamineTextBlock)));
29
30 var uri = new Uri("/Dreamine.UI.Wpf.Themes;component/DreamineTextBlockStyle.xaml", UriKind.RelativeOrAbsolute);
31
32 if (Application.Current != null)
33 {
34 bool alreadyAdded = Application.Current.Resources.MergedDictionaries
35 .OfType<ResourceDictionary>()
36 .Any(x => x.Source != null && x.Source.Equals(uri));
37
38 if (!alreadyAdded)
39 {
40 var dict = new ResourceDictionary { Source = uri };
41 Application.Current.Resources.MergedDictionaries.Add(dict);
42 }
43 }
44 }

다음을 참조함 : DreamineTextBlock().

다음에 의해서 참조됨 : DreamineTextBlock().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

멤버 함수 문서화

◆ GetCommand()

ICommand Dreamine.UI.Wpf.Controls.DreamineTextBlock.GetCommand ( DependencyObject obj)
inlinestatic

대상 개체의 명령을 가져옵니다.

매개변수
obj값을 읽을 개체입니다.
반환값
구성된 명령입니다.
예외
ArgumentNullExceptionobj 가 null이면 발생합니다.
InvalidCastException저장된 값이 명령이 아니면 발생합니다.

DreamineTextBlock.cs 파일의 243 번째 라인에서 정의되었습니다.

243=> (ICommand)obj.GetValue(CommandProperty);

다음을 참조함 : CommandProperty.

다음에 의해서 참조됨 : TryExecuteCommand().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ GetCommandParameter()

object Dreamine.UI.Wpf.Controls.DreamineTextBlock.GetCommandParameter ( DependencyObject obj)
inlinestatic

대상 개체의 명령 매개변수를 가져옵니다.

매개변수
obj값을 읽을 개체입니다.
반환값
구성된 명령 매개변수입니다.
예외
ArgumentNullExceptionobj 가 null이면 발생합니다.

DreamineTextBlock.cs 파일의 312 번째 라인에서 정의되었습니다.

313 => obj.GetValue(CommandParameterProperty);

다음을 참조함 : CommandParameterProperty.

다음에 의해서 참조됨 : TryExecuteCommand().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ GetCommandTriggerName()

string Dreamine.UI.Wpf.Controls.DreamineTextBlock.GetCommandTriggerName ( DependencyObject obj)
inlinestatic

대상 개체의 명령 트리거 이름을 가져옵니다.

매개변수
obj값을 읽을 개체입니다.
반환값
구성된 이벤트 이름입니다.
예외
ArgumentNullExceptionobj 가 null이면 발생합니다.
InvalidCastException저장된 값이 문자열이 아니면 발생합니다.

DreamineTextBlock.cs 파일의 166 번째 라인에서 정의되었습니다.

167 => (string)obj.GetValue(CommandTriggerNameProperty);

다음을 참조함 : CommandTriggerNameProperty.

다음에 의해서 참조됨 : TryExecuteCommand().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ OnCommandChanged()

void Dreamine.UI.Wpf.Controls.DreamineTextBlock.OnCommandChanged ( DependencyObject d,
DependencyPropertyChangedEventArgs e )
inlinestaticprivate

명령 값 변경 시 미리 보기 마우스 놓기 이벤트 처리기를 연결합니다.

매개변수
d명령 값이 변경된 개체입니다.
e속성 변경 데이터입니다.

현재 구현은 명령이 다시 변경될 때 처리기를 중복 연결할 수 있습니다.

DreamineTextBlock.cs 파일의 347 번째 라인에서 정의되었습니다.

348 {
349 if (d is UIElement element)
350 {
351 // 마우스 클릭
352 element.AddHandler(UIElement.PreviewMouseUpEvent, new MouseButtonEventHandler((s, e) =>
353 {
354 TryExecuteCommand(d, "PreviewMouseUp", e);
355 }), true);
356 }
357 }

다음을 참조함 : TryExecuteCommand().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ SetCommand()

void Dreamine.UI.Wpf.Controls.DreamineTextBlock.SetCommand ( DependencyObject obj,
ICommand value )
inlinestatic

대상 개체의 명령을 설정합니다.

매개변수
obj값을 설정할 개체입니다.
value실행할 명령입니다.
예외
ArgumentNullExceptionobj 가 null이면 발생합니다.

DreamineTextBlock.cs 파일의 201 번째 라인에서 정의되었습니다.

201=> obj.SetValue(CommandProperty, value);

다음을 참조함 : CommandProperty.

◆ SetCommandParameter()

void Dreamine.UI.Wpf.Controls.DreamineTextBlock.SetCommandParameter ( DependencyObject obj,
object value )
inlinestatic

대상 개체의 명령 매개변수를 설정합니다.

매개변수
obj값을 설정할 개체입니다.
value명령 매개변수입니다.
예외
ArgumentNullExceptionobj 가 null이면 발생합니다.

DreamineTextBlock.cs 파일의 277 번째 라인에서 정의되었습니다.

278 => obj.SetValue(CommandParameterProperty, value);

다음을 참조함 : CommandParameterProperty.

◆ SetCommandTriggerName()

void Dreamine.UI.Wpf.Controls.DreamineTextBlock.SetCommandTriggerName ( DependencyObject obj,
string value )
inlinestatic

대상 개체의 명령 트리거 이름을 설정합니다.

매개변수
obj값을 설정할 개체입니다.
value쉼표 구분 이벤트 이름입니다.
예외
ArgumentNullExceptionobj 가 null이면 발생합니다.

DreamineTextBlock.cs 파일의 123 번째 라인에서 정의되었습니다.

124 => obj.SetValue(CommandTriggerNameProperty, value);

다음을 참조함 : CommandTriggerNameProperty.

◆ TryExecuteCommand()

void Dreamine.UI.Wpf.Controls.DreamineTextBlock.TryExecuteCommand ( DependencyObject d,
string eventName,
RoutedEventArgs eventArgs )
inlinestaticprivate

발생한 이벤트 이름이 구성된 트리거 목록과 일치하면 명령을 실행합니다.

매개변수
d명령 설정을 보유한 개체입니다.
eventName발생한 이벤트 이름입니다.
eventArgs기본 명령 매개변수로 사용할 이벤트 데이터입니다.

DreamineTextBlock.cs 파일의 392 번째 라인에서 정의되었습니다.

393 {
394 var rawTrigger = GetCommandTriggerName(d);
395 if (string.IsNullOrEmpty(rawTrigger))
396 return;
397
398 var triggerList = rawTrigger.Split(',')
399 .Select(x => x.Trim())
400 .Where(x => !string.IsNullOrEmpty(x));
401
402 if (!triggerList.Contains(eventName, StringComparer.OrdinalIgnoreCase))
403 return;
404
405 var command = GetCommand(d);
406 var parameter = GetCommandParameter(d) ?? eventArgs;
407
408 if (command?.CanExecute(parameter) == true)
409 command.Execute(parameter);
410 }

다음을 참조함 : GetCommand(), GetCommandParameter(), GetCommandTriggerName().

다음에 의해서 참조됨 : OnCommandChanged().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

멤버 데이터 문서화

◆ CommandParameterProperty

readonly DependencyProperty Dreamine.UI.Wpf.Controls.DreamineTextBlock.CommandParameterProperty
static
초기값:
=
DependencyProperty.RegisterAttached(
"CommandParameter",
typeof(object),
new PropertyMetadata(null))

명령에 전달할 연결 매개변수 속성입니다. 값이 없으면 이벤트 데이터가 전달됩니다.

DreamineTextBlock.cs 파일의 69 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : GetCommandParameter(), SetCommandParameter().

◆ CommandProperty

readonly DependencyProperty Dreamine.UI.Wpf.Controls.DreamineTextBlock.CommandProperty
static
초기값:
=
DependencyProperty.RegisterAttached(
"Command",
typeof(ICommand),
new PropertyMetadata(null, OnCommandChanged))
static void OnCommandChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
Hooks internal event handlers once when Command changes.

구성된 입력 이벤트에서 실행할 연결 명령 속성입니다.

DreamineTextBlock.cs 파일의 54 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : GetCommand(), SetCommand().

◆ CommandTriggerNameProperty

readonly DependencyProperty Dreamine.UI.Wpf.Controls.DreamineTextBlock.CommandTriggerNameProperty
static
초기값:
=
DependencyProperty.RegisterAttached(
"CommandTriggerName",
typeof(string),
new PropertyMetadata(null))

명령 실행을 트리거할 쉼표 구분 이벤트 이름 목록 속성입니다.

DreamineTextBlock.cs 파일의 84 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : GetCommandTriggerName(), SetCommandTriggerName().


이 클래스에 대한 문서화 페이지는 다음의 파일로부터 생성되었습니다.: