일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- ipad
- SPL
- pycharm
- mean
- pandas
- GitHub
- E-P1
- RNN
- javascript
- Splunk
- imread
- 알고리즘
- Series
- GT-S80
- synology
- pip
- CNN
- dataframe
- mariadb
- LSTM
- Button
- index
- DFS
- 삼성소프트웨어멤버십
- Lotto
- install
- Python
- keras
- Numpy
- SciPy
Archives
- Today
- Total
잠토의 잠망경
ResourceDictionary 추가하기 본문
1. 추가 버튼을 누른다.
2. 추가한 XAML에 다음과 같이 TEST CODE를 작성한다.
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x ="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Name ="TEST1" TargetType="{ x:Type Button}">
<Setter Property ="Background" Value="Red"/>
</Style >
</ResourceDictionary> |
3. 다음과 같이 추가한 DICATIONARY를 추가하면 어디서든 사용 가능하다.
<Window x :Class="WpfApplication33.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x ="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height ="350" Width="525">
<Window.Resources >
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source ="Dictionary1.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources >
<Grid >
<Button Style ="{StaticResource TEST1 }" Content="BUTTON"/>
</Grid >
</Window> |