■ 리소스 구하기

----------------------------------------------------------------------------------------------------

XAML

 

 

<Grid x:Name="grid">

    <Grid.Resources>

        <SolidColorBrush x:Key="SolidColorBrushKey" Color="Orange" />

    </Grid.Resources>

</Grid>

 

 

C#

 

 

using System.Windows.Media;

 

SolidColorBrush solidColorBrush = this.grid.Resources["SolidColorBrushKey"] as SolidColorBrush;

 

----------------------------------------------------------------------------------------------------

Posted by 사용자 icodebroker
TAG