Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

How to change the state of one style from code-behind??

$
0
0

Hi all of you,

In my settings, I would like to allow the user final the chance to enable/disable SpellCheck WPF stuff.

My issue comes when I try to alter the value of this style which allows spelling in my Textboxes...

I have not idea how to and if it is possible to change the value of my Styles.XAML file in run-time:

Styles.XAML

<Style TargetType="{x:Type TextBoxBase}" x:Key="txtBasic">
        <Setter Property="SpellCheck.IsEnabled" Value="False"/>    
</Style>

How can I update the value for my txtBasic style and put another value in the property SpellCheck.IsEnabled??

Thanks in advance,


Primary platform is Windows 7 Ultimate 64 bit along with VS 2012/Sql2k8 for WPF/SilverLight projects.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>