Tag Archives: IValueConverter

Use XAML resource in WPF IValueConverter

If you don’t want to hardcoded┬ástyles and colors in you WPF, Silverlight or WP7 project you’ve probably added some styles and predefined colors in the APP.XAML file: <Style TargetType="TextBlock" x:Key="Style1"> <Setter Property="Foreground" Value="Black"/> <Setter Property="FontSize" Value="{StaticResource PhoneFontSizeLarge}"/> <Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilySemiLight}"/> </Style> <Style TargetType="TextBlock" x:Key="Style2"> <Setter Property="Foreground" Value="Red"/> <Setter Property="FontSize" Value="{StaticResource PhoneFontSizeMedium}"/> <Setter Property="FontFamily" Value="{StaticResource […]

Comments Off on Use XAML resource in WPF IValueConverter