![]() Almost all of that code is found in the data binding ability of the ErrorProvider (I didn't even know ErrorProvider could work off of a DataSet all automagically like that). This thing uses a ton of internal types and internal methods on public types. At first I figured I could just do a copy/paste job from Reflector and modify the timer bits. ![]() Let me rephrase the statement: The only other thing I can think of is to do your own ErrorProvider, but I looked into this for someone else, and the amount of work involved is staggering. I'm re-quoting Deborah's statement to point out that it is a gross understatement. ![]() But I looked into this for someone else, and it does not appear to be very easy to do. I read on internet that to make a custom style of radio button you need to create a toggle button style.The only other thing I can think of is to do your own ErrorProvider. You have to create a style for the type RadioButton. The RelativeSource binding does not work, because it does not search for ancestors within the control template and will therefore not find the ToggleButton. In order to solve your issue, you should create an appropriate style for RadioButton. It is not necessary to use a toggle button in it, but even if you would, the triggers would be defined in the control template, too. Moreover, the style for the ToggleButton as you have defined it is implicit (without an x:Key), which causes it to be applied to every toggle button in scope, not just the RadioButton and that is not what you want. I have created a sample style that might look similar to what your are trying to do. It is still a radio button, but with your custom Path as option mark and your custom colors applied to the respective states. In this example, the Path is embedded in the control template and the Content, here the text Test is still applied. You can of course further customize the template so that it fits your requirements. If you want the Content and the option mark to be customizable without creating a different style, you will have to create a custom radio button control derived from RadioButton and expose a dependency property to specify the option mark content.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |