티스토리 뷰
/*
* <ABC.Resources>
* <Style TargetType="TextBox">
* <Setter Property="FontSize" Value="25" />
* </Style>
* </ABC.Resources>
*/
Style^ textStyle = ref new Windows::UI::Xaml::Style(Windows::UI::Xaml::Interop::TypeName(TextBox::typeid));
Setter^ fontSizeSetter = ref new Setter(TextBox::FontSizeProperty, ref new Platform::Box<int>(25));
textStyle->Setters->Append(fontSizeSetter);
myABCControl->Resources->Insert(nullptr, textStyle);
- operator Windows::UI::Xaml::Interop::TypeName()
- https://docs.microsoft.com/en-us/cpp/cppcx/operator-windows-ui-xaml-interop-typename
- Platform::Type^ -> 변환 -> Winodws::UI::Xaml::Interop::TypeName
- Platform::Type^은 클래스::typeid 혹은 인스턴스->GetType() 으로. (후자 안 해봄)
대상이 런타임에 만들어지는 ControlTemplate 이 소스이면 다 소용없고 VisualTreeHelper의 GetChildrenCount / GetChild 와 FrameworkElement::FindName 을 활용해서 찾아야 함. 템플릿이 바뀌면 코드가 꽝나는 건 덤
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- javascript
- ActivityPub
- upbit
- Godot Engine
- Oracle Cloud Infrastructure
- exercism
- K8s
- pdf.js
- OStatus
- scss
- 개발기록
- 업비트
- pleroma
- C#
- 쿠버네티스
- kotlin당했다
- Sass
- vuex
- gitea
- C++ FAQ
- 시스어드민
- rust-lang
- 오라클 클라우드 인프라
- ArchLinuxARM
- 오라클 클라우드
- 마스토돈
- mvu
- c++
- 토이프로젝트
- 왜 생각이 안 났지
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
글 보관함