in Education by
Anyone found a good pattern for getting around immutable styles in Silverlight 2? What I mean is does anyone have a workaround for the fact that you cannot switch the style of an element programmatically once it has been set, i.e. the second line here will throw a catastrophic failure exception: this.TestButton.Style = (Style)Application.Current.Resources["Fred"]; this.TestButton.Style = (Style)Application.Current.Resources["Barney"]; JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
It's not possible. The best workaround I've seen is from Nikhil Kothari at Microsoft: http://www.nikhilk.net/Silverlight-Themes.aspx There is a major drawback to defining styles centrally in App.xaml anyway, which is that it breaks all designer support when you reference those styles from other user controls. I haven't used it but Nikhil's theme engine looks very promising, and I have a funny feeling that many of his ideas will make it into the silverlight product eventually anyway.

Related questions

0 votes
    (2) What are styles in digital documentation? Write name of any two styles category Select the correct answer from above options...
asked Dec 19, 2021 in Education by JackTerrance
0 votes
    In .NET 4 beta 2, there is the new Numerics namespace with struct BigInteger. The documentation states that it is an ... = BigInteger.One; BigInteger b = BigInteger.One; while (b...
asked May 24, 2022 in Education by JackTerrance
0 votes
    In .NET 4 beta 2, there is the new Numerics namespace with struct BigInteger. The documentation states that it is an ... = BigInteger.One; BigInteger b = BigInteger.One; while (b...
asked May 8, 2022 in Education by JackTerrance
0 votes
    In Mercury I can use: A = B^some_field := SomeValue to bind A to a copy of B, except that ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 4, 2022 in Education by JackTerrance
0 votes
    In Mercury I can use: A = B^some_field := SomeValue to bind A to a copy of B, except that ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 4, 2022 in Education by JackTerrance
0 votes
    In Mercury I can use: A = B^some_field := SomeValue to bind A to a copy of B, except that ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 4, 2022 in Education by JackTerrance
0 votes
    what is mutable and immutable data type give two example of each Select the correct answer from above options...
asked Dec 2, 2021 in Education by JackTerrance
0 votes
    How to create an immutable class in JAVA?...
asked May 19, 2021 in Technology by JackTerrance
0 votes
    The company where I work created this application which is core to our business and relies on the web ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 27, 2022 in Education by JackTerrance
0 votes
    I'm a .Net developer and want to get into developing Silverlight applications. I have VS 2008 but wanted ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 23, 2022 in Education by JackTerrance
0 votes
    Im calling a locally hosted wcf service from silverlight and I get the exception below. Iv created a ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 22, 2022 in Education by JackTerrance
0 votes
    I'm a .Net developer and want to get into developing Silverlight applications. I have VS 2008 but wanted ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 22, 2022 in Education by JackTerrance
0 votes
    Im calling a locally hosted wcf service from silverlight and I get the exception below. Iv created a ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 19, 2022 in Education by JackTerrance
0 votes
    From my silverlight 4.0 application. I can access the WCF File easily but when moved to https, I ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 4, 2022 in Education by JackTerrance
0 votes
    In my Silverlight application I want to show a child window which prompts the user if he want to leave ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 2, 2022 in Education by JackTerrance
...